Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Windows XP

Windows XP Discuss the Microsoft Windows XP Operating System



Reply
 
LinkBack Thread Tools
  #1  
Old 01-17-2009, 08:58 PM
+Bob+
Newsgroup Contributor
 
Posts: n/a
.bat file to copy files using current date as part of name?

I need to set up a bat file that will use xcopy to copy a directory
from one drive to another. The resulting directory needs to
incorporate the date that it is copied into the name. Something like
this:

xcopy c:\bigdir\*.*/s/e d:\bigdir-10-oct-2008\*.*

I need to do this on a regular basis, so how can I pull the date
within the bat file into a variable?

Also, assuming I can get the date into a variable named something like
"DateIn" will a command like this work:

xcopy c:\bigdir\*.*/s/e d:\bigdir-%DateIn%\*.*

Thanks,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 01-17-2009, 08:58 PM
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I access the Volume Shadow Copy of a file directly so I can include is part of small nightly backup job from another pc? Derek Windows Vista 0 06-19-2008 06:10 AM
Create date changes when I copy a file :-( Lars-Erik Østerud Windows XP 2 02-17-2008 02:11 PM
vista can't copy large files? another XP file-copy bug? Dave Windows Vista 3 01-26-2008 10:50 AM
Differential File Copy by Date? ross m. greenberg Windows Vista 0 08-16-2007 05:30 AM
How do I copy new files and modified files having new time/date? Don J Windows XP 2 04-14-2007 09:15 PM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 05:02 AM.


2003 - 2010 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0