Solved

Nightly Backup of Single File

Posted on 2004-04-21
7
256 Views
Last Modified: 2010-04-13
I need to do a nightly backup of a single file. This file needs to be dated and perhaps renamed with the date in it, or placed in a folder named the date. Filename 'filmsd.mde'. I was thinking perhaps a batch file would do...

Thanks,

Paul.
0
Comment
Question by:H4Inf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 10884528
This should do it...

------copyit.bat-----------
@for /f "tokens=1-3 delims=/" %%a in ("%date%") do copy c:\MySource\filmsd.mde C:\MyDestination\filmsd-%%a%%b%%c.mde
---------------------------

Then, use Task Scheduler in Control Panel to schedule it nightly...
0
 

Author Comment

by:H4Inf
ID: 10885386
C:\BACKUP>backup_sen

C:\BACKUP>copy c:\films\filmsd.mde C:\backup\films\filmsd-Thu 04222004.mde
The syntax of the command is incorrect.
0
 

Author Comment

by:H4Inf
ID: 10885400
There is a space after Thu, perhaps this is the issue? How do I remedy it.

Paul.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:H4Inf
ID: 10885421
Ok I got it ;-) Thanks!
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 10886926
How'd you clear it?
If your version displays the day, you can adjust tokens to equal 2-4 and delims to equal "/" with a trailing {space}
Glad you got it working though.  Thanx. :D
0
 

Author Comment

by:H4Inf
ID: 10887033
@for /f "tokens=1-3 delims=/" %%a in ("%date%") do copy c:\MySource\filmsd.mde "C:\MyDestination\filmsd-%%a%%b%%c.mde"

Just added the quotes around the destination file. =)

Paul.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 10887098
Okay - so you're including the 'day' part of the date...
The last adjustment will exclude it (and you can exclude the quotes) if you're interested...
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Why Windows 7 desktop can not connect to Windows 2000 terminal server? 3 1,399
win2k service packs 5 664
website 1 322
Disk size support for operating systems 12 540
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Facebook has became the #1 social media platform. People share many funny videos there, yet you don't know how to download them? Now you can download Videos from Facebook in just 3 simple steps.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question