• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

batch file help

cuti7399

Platinum Member
Hello all,
I wrote this litte batch file to copy the backup file and rename it to the date which works on xp pcs (date format mon 07/05/2009) but does not work on win98 pcs (date format mon 07-05-2009). Please help, thanks

@echo off

cd\backup

copy backup.tdf temp.tdf

for /f "tokens=1-5 delims=/ " %%d in ("%date%") do rename "temp.tdf" sa24-%%e-%%f-%%g.tdf


:end

exit
 
I'll venture a guess that Win98 doesn't do that kind of for loop. Batch files were a lot less capable back then.

But you could try replacing delims=/ with delims=- and see what happens. Otherwise, VBScript (or maybe even a full-blown C program) would probably work better for your needs.
 
replacing delims=/ with delims=-
did that already and it gave me a syntax error. the way this system is setup, I can't use other option. I just don't know where the syntax error is. the "for loop"???
 
Back
Top