Solved

Nightly Backup of Single File

Posted on 2004-04-21
7
252 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
  • 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

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…
For months I had no idea how to 'discover' the IP address of the other end of a link (without asking someone who knows), and it drove me batty. Think about it. You can't use Cisco Discovery Protocol (CDP) because it's not implemented on the ASAs.…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now