Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am trying to create a batch file that will move a file to 2 different places and then rename the file by the date and time it was moved. I can get it to work with XP but W2k Pro gives me the error "in was unexpected at this time". Here is what I have coded so far:
@ECHO OFF
COPY "C:\AMANDA\ACCT_ENTRY.CSV" "C:\PAYANYTIME BACKUP"
for /F "tokens=1,2,3,4 delims=/ " %%i in ('date/t') do set d=%%l%%j%%k%%i
FOR /F "tokens=1,2,3 delims=:., "%%a in ("%TIME%") do set t=%%a%%b%%c
set t=%t:~0,8%
set DATE-TIME=%d%-%t%
echo %DATE-TIME%
ren "c:\PAYANYTIME BACKUP\ACCT_ENTRY.CSV" "%d%-%t%.csv"COPY "C:\AMANDA\ACCT_ENTRY.CSV" "Z:\PAYANYTIME"
for /F "tokens=1,2,3,4 delims=/ " %%i in ('date/t') do set d=%%l%%j%%k%%i
FOR /F "tokens=1,2,3 delims=:., "%%a in ("%TIME%") do set t=%%a%%b%%c
set t=%t:~0,8%
set DATE-TIME=%d%-%t%
echo %DATE-TIME%
ren "Z:\PAYANYTIME\ACCT_ENTRY.CSV" "%d%-%t%.csv"DEL "C:\AMANDA\ACCT_ENTRY.CSV"
COPY "C:\ACCT_ENTRY TEMPLATE.CSV" "C:\AMANDA\ACCT_ENTRY.CSV"
Any help would be appreciated.
Thanks.

![]() |
W2000 keeps getting lsass...
|
Windows 2K / XP local use...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |