Hi I need some help with this if poss...
I have a file copied to a local server in this format each day.
(Mon-01-08-2004-WSS_Transcript_Log.001.Z)
What I'm trying to do is have a batch script that will copy the relevant file to another location and unzip it, this should be done automatically without having to edit the batch file.
So being a bit new to this I see I have a few options, the best documented is using Tokens and Delims, however I don't fully understand what I'm doing here.
I understand the theory behind Tokens & Delims (sort of) and know that the date format will be like this 'Mon 01/08/2004'
So I have this - For /F "tokens=1 delims= " and this should capture 'Mon' as a variable.
What I guess should happen after that is an IF statement, maybe something like this
IF %DDD% == Mon*.*.Z GOTO Mon (where %DDD% is the first 3 characters from the date)
:Mon copy Mon*.*.Z c:\NewLocation
IF %DDD% == Tue*.*.Z GOTO Tue
:Tue copy Tue*.*.Z c:\NewLocation
Can anyone help with this?
Tezdread
"With every solution comes a new problem"
I have a file copied to a local server in this format each day.
(Mon-01-08-2004-WSS_Transcript_Log.001.Z)
What I'm trying to do is have a batch script that will copy the relevant file to another location and unzip it, this should be done automatically without having to edit the batch file.
So being a bit new to this I see I have a few options, the best documented is using Tokens and Delims, however I don't fully understand what I'm doing here.
I understand the theory behind Tokens & Delims (sort of) and know that the date format will be like this 'Mon 01/08/2004'
So I have this - For /F "tokens=1 delims= " and this should capture 'Mon' as a variable.
What I guess should happen after that is an IF statement, maybe something like this
IF %DDD% == Mon*.*.Z GOTO Mon (where %DDD% is the first 3 characters from the date)
:Mon copy Mon*.*.Z c:\NewLocation
IF %DDD% == Tue*.*.Z GOTO Tue
:Tue copy Tue*.*.Z c:\NewLocation
Can anyone help with this?
Tezdread
"With every solution comes a new problem"