I used to know dos pretty well, but it's been a long time since I've used it extensively, and I'm not sure how I might do this. Is there a way in what's left of dos in the XP Cmd Prompt to use the time and date as a folder name?
Basically, I want to copy two folders in a little .bat file, and copy them to an external drive. To avoid overwriting, I want to create a new destination folder each time and use the current time and date as the name of the folder. Then copy the folders into that folder.
Any DOS guru's know if this is possible in XP?
I'll say it again: Blitzmax to the rescue :)
It's another ten liner, but this time you'll have to do it yourself.
No problem, I got it now. Thanks anyway. Yeah, I'm sure Subversion and Blitzmax would have been fine, but it's overkill. A dos .bat file on the desktop is perfect.
A properly done Xcopy <source> <dest> in a BAT which you add to Scheduled Tasks should suffice.
Check the options on Xcopy, especially with regard to preventing it from prompting, continue on error, copy only files with archive bit, copy all attributes, create folders etc.
I wrote a script to do exactly this at work the other day. All output was redirected to a log file which was timestamped (echo >>newlogfile.txt %time% %date%).
If you log to a file, always log to newlogfile.txt and when the backup is complete, rename it to logfile.txt.
Ah, DOS - the good old days. :P
here's one of my bath files with all the cool switches:
xcopy c:\blitzplus\jake\*.* f:\BackupDynamic\blitzplus\jake\*.* /e /h /r /y
xcopy c:\blitzmax\jake\*.* f:\BackupDynamic\blitzmax\jake\*.* /e /h /r /y
xcopy e:\art\*.* f:\BackupDynamic\art\*.* /e /h /r /y
xcopy e:\jbcs\*.* f:\BackupDynamic\jbcs\*.* /e /h /r /y
xcopy e:\text\*.* f:\BackupDynamic\text\*.* /e /h /r /y
xcopy e:\web\*.* f:\BackupDynamic\web\*.* /e /h /r /y
xcopy "C:\documents and settings\jake birkett\application data\microsoft\address book\*.*" "F:\BackupDynamic\documents and settings\jake birkett\application data\microsoft\address book\*.*" /e /h /r /y
xcopy "C:\documents and settings\jake birkett\desktop\*.*" "F:\BackupDynamic\documents and settings\jake birkett\desktop\*.*" /e /h /r /y
xcopy "C:\documents and settings\jake birkett\favorites\*.*" "F:\BackupDynamic\documents and settings\jake birkett\favorites\*.*" /e /h /r /y
xcopy "C:\documents and settings\jake birkett\local settings\application data\*.*" "F:\BackupDynamic\documents and settings\jake birkett\local settings\application data\*.*" /e /h /r /y
xcopy "C:\documents and settings\jake birkett\my documents\*.*" "F:\BackupDynamic\documents and settings\jake birkett\my documents\*.*" /e /h /r /y
A properly done Xcopy <source> <dest> in a BAT which you add to Scheduled Tasks should suffice.
With a ghetto mentality like that, why are you looking forward to Vista, exactly?