modify batch script for extrating two files

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
arjun4356
Posts: 1
Joined: 13 May 2010 21:45

modify batch script for extrating two files

#1 Post by arjun4356 » 15 May 2010 09:38

can anyone help me modifiying the batch script:

SETLOCAL
SET PGM=WTX
SET SYSNAME=G1234W
SET TRANSET=PS
SET Fltr="TLUS*.*"
.
.
IF [%PGM%]==[WTX] (
SET LPath="%LDrv%\WTXDTA\\DAT\ZIP\"
SET APath="%LDrv%\WTXDTA_ARC\DAT\ZIP\"
SET TPath=!LPath:"=!

.
.
.
.
.
>"%ScriptFull1:"=%" (ECHO open %FtpSite%)
>>"%ScriptFull1:"=%" (ECHO %FtpUser%)
>>"%ScriptFull1:"=%" (ECHO %FtpPass%)
>>"%ScriptFull1:"=%" (ECHO type binary)
>>"%ScriptFull1:"=%" (ECHO lcd "%TPath:~0,-1%")
>>"%ScriptFull1:"=%" (ECHO cd "%RPath:"=%")
>>"%ScriptFull1:"=%" (ECHO dir %Fltr:"=% "%DrFull:"=%")
>>"%ScriptFull1:"=%" (ECHO ls %Fltr:"=% "%LsFull:"=%")
>>"%ScriptFull1:"=%" (ECHO mget %Fltr:"=%)
>>"%ScriptFull1:"=%" (ECHO quit)

This script gets all the file startin with TLUS from the ftp server now i just want the files that start with TLUS2*.*,TLUS3*.* and TLUS4*.* can any one suggest me so that i can get only these 3 files in the two specified folders

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: modify batch script for extrating two files

#2 Post by aGerman » 15 May 2010 13:46

As far as I remember you can write several files behind the mget command

Code: Select all

SET Fltr="TLUS2*.* TLUS3*.* TLUS4*.*"

Give it a try.

Regards
aGerman

Post Reply