batch file to find and copy
|
Original Message
|
Name: David04
Date: January 20, 2004 at 21:11:39 Pacific
Subject: batch file to find and copy OS: xp CPU/Ram: 2.54Ghz 512Mb
|
Comment: Hi, I currently have a batch file thats creates a new directory with the current date as its name (in the format YYYYMMDD). Is it possible to have another batch file that finds this directory and copies files to it?
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: dtech10
Date: January 21, 2004 at 14:21:20 Pacific
Subject: batch file to find and copy |
Reply: (edit)Hi I take it your using the american date format ie. MM/DD/YYYY. If so will this help. @echo off set XDate=:~7,4%%date:~0,2%%date:~3,2% rem Xdate should equal YYYYMMDD. rem 2nd batch file o0r same batch file copy *.* %XDate% rem or path to XDate directory. ------------------ You could use the above to create the directory md %XDate%
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: lenin
Date: February 2, 2004 at 23:41:47 Pacific
Subject: batch file to find and copy
|
Reply: (edit)Hi, I need to write a bacth file to backup the processed file to a backup directory. Backup file name should include the current date at the end. I am facing problem in formatting the date, since the windows doesn't allow back-slash(/) as part of the file name. Regards, Lenin
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: