Margin_Walker
asked on
Dos For loop
Hi Experts,
I am trying to copy a list of zip files from a shared drive to my drive.
The problem is that the zip files differ slightly (time stamped) and I can only pull one down
\\128.xx.xxx.xxx\c$\calyps o\calypso\ Calculator 8806_OFFLI NE_60008.l og_034004_ 2008_6_10. zip
\\128.xx.xxx.xxx\c$\calyps o\calypso\ Calculator 8806_OFFLI NE_60008.l og_052629_ 2008_6_10. zip
\\128.xx.xxx.xxx\c$\calyps o\calypso\ Calculator 8806_OFFLI NE_60008.l og_070133_ 2008_6_10. zip
\\128.xx.xxx.xxx\c$\calyps o\calypso\ Calculator 8806_OFFLI NE_60008.l og_084614_ 2008_6_10. zip
\\128.xx.xxx.xxx\c$\calyps o\calypso\ Calculator 8806_OFFLI NE_60008.l og_095722_ 2008_6_10. zip
\\128.xx.xxx.xxx\c$\calyps o\calypso\ Calculator 8806_OFFLI NE_60008.l og_112157_ 2008_6_10. zip
\\128.xx.xxx.xxx\c$\calyps o\calypso\ Calculator 8806_OFFLI NE_60008.l og_113838_ 2008_6_10. zip
1 file(s) copied.
I guess what I need to do is give each copy a counter value but Im having problems doing this.
Can you please help.
Thanks,
Margin_Walker
I am trying to copy a list of zip files from a shared drive to my drive.
The problem is that the zip files differ slightly (time stamped) and I can only pull one down
\\128.xx.xxx.xxx\c$\calyps
\\128.xx.xxx.xxx\c$\calyps
\\128.xx.xxx.xxx\c$\calyps
\\128.xx.xxx.xxx\c$\calyps
\\128.xx.xxx.xxx\c$\calyps
\\128.xx.xxx.xxx\c$\calyps
\\128.xx.xxx.xxx\c$\calyps
1 file(s) copied.
I guess what I need to do is give each copy a counter value but Im having problems doing this.
Can you please help.
Thanks,
Margin_Walker
REM 09/02/2007
REM This script will grab the CALCULATOR logs from each blade on each server listed in OFFLINE_Servers.txt
FOR /F "skip=1 tokens=1 usebackq" %%i in (OFFLINE_Servers.txt) do copy \\%%i\c$\calypso\calypso\Calculator8806_OFFLINE_60008.log_*2008_6_10.zip \\clypcalb10l\d$\pb_utility\rafter\%%i_RAF%Count%TER_Calculator8806_OFFLINE_60008.zip
IF NOT %ERRORVALUE%==0 GOTO ERRORHANDLE
GOTO TERMINATE
:ERRORHANDLE
ECHO Error ! %ERRORVALUE%
pause
:TERMINATE
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1 - Copy everything using gs121's suggestion.
2 - Copy the latest one.
3 - Copy all but rename them with a counter.
Which door will you choose? Remember, you can only choose one door!!!
(Now hop around like an over excited member to the public on some cheesy game show!).