| 1. |
Solve : shedule time for copy/transfer folders job? |
|
Answer» i want to copy 8 huge folders to external hardisk, but i want to do this one folder each time at schedule time, because those files may ACCESS by others during office hour. Rem date is a command and should be used a variable name %date% is already used as a system variable name, Bill, so it should not be modified or altered. date is a command and should not be used as a variable name. Quote from: only_lonely on July 25, 2010, 01:18:15 AM i got this code to create data folder but somehow it doesn't work perfectlydate is a command and should not be used as a variable name.C:\>date /t Mon 07/26/2010 C:\>echo %DATE% Mon 07/26/2010 C:\>date The current date is: Mon 07/26/2010 Enter the new date: (mm-dd-yy) C:\> Quote from: marylane on July 26, 2010, 09:13:25 AM Yes, and your point is, Bill?The original poster( only_lonely ) used the command "date" as a personal variable: echo off SET date="%date:~6,4%-%date:~0,2%-%date:~2,2%" Good job editing your post bill! Quote from: marylane on July 26, 2010, 09:24:40 AM The original poster( only_lonely ) used the command "date" as a personal variable: Bill, this may or may not be a bad IDEA, as thereafter in that session, (and only in that session) the system variable %date%, which is provided for the user's convenience, will be different from the default (as set in Regional Options in Control Panel). As I say, it may or may not be a bad thing. The sky won't fall, however, Bill. Like I said, only in that session... The following (reply 1 above ) is from the original poster, only_lonely. The name given to the file was not the goal. Using a command, "date" as a personal variable does not work. type ol726.bat echo off SET date="%date:~6,4%-%date:~0,2%-%date:~2,2%" echo date=%date% pause md e:\2\%date% copy C:\1\*.* e:\2\%date% dirol726.bat date="Mo-n-"/-26" the above is mistake Terminate batch job (Y/N)? y p.s. It does not work for this session or any sessionBill posts his usual nonsense. Countdown to ban time... |
|