Scripts Thread, create a folder with dates, in Coding and Web Development; hello,
what i need is help with making a batch file that automaticly back up my work i know how ...
3rd April 2008, 09:11 AM #1
create a folder with dates,
what i need is help with making a batch file that automaticly back up my work i know how to do this and how to make the folder the backed up work will go in to, BUT the bit i am having trouble with is i need a script that will rename or make a folder with the current date.
any will will be appreciated.
3rd April 2008, 09:24 AM #2
- Rep Power
cd E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\
copy wbls m:\eclipsebackups\wbls-%date%
i wrote that to get around the fact that date /t contains /'s which are invalid in folder names (yeah, way to go M$)
hope that works for you
3rd April 2008, 10:04 AM #3
My manual backup of SIMS goes something like this:
REM *** Backs up the SIMS Databases ***
DBATTACH /DATABASE=sims /backup /auto /user=******** /password=************** /SERVER=sims\sims_db
REM *** Copies the Docstorage Folder ***
REM *** Setdate creates a folder structure with the current date as the folder name
call setinto.bat date
xcopy d:\sims\sims\docstorage\*.* "D:\Sims\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\Docstorage\%date%\" /e /y
xcopy d:\sims\sims\fmssql\db\sims.db "D:\Sims\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\FMS\DB\%date%\" /y
xcopy d:\sims\sims\fmssql\db\sims.log "D:\Sims\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\FMS\DB\%date%\" /y
xcopy d:\sims\sims\fmssql\db2\sims.db "D:\Sims\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\FMS\DB2\%date%\" /y
xcopy d:\sims\sims\fmssql\db2\sims.log "D:\Sims\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\FMS\DB2\%date%\" /y
... and uses setdate .exe to set the variables.
Can't remember where I got setdate from now so I can't credit it.
Hope this helps
Thanks to Heebeejeebee from:
sharkster (3rd April 2008)
By cjohnsonuk in forum MIS Systems
Last Post: 19th March 2008, 01:25 PM
By goodhead in forum Windows Vista
Last Post: 7th March 2007, 05:42 PM
By OutToLunch in forum Windows
Last Post: 10th January 2007, 03:55 PM
By CyberNerd in forum BSF
Last Post: 1st December 2006, 10:43 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)