Page 1 of 1

modify batch script for extrating two files

Posted: 15 May 2010 09:38
by arjun4356
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

Re: modify batch script for extrating two files

Posted: 15 May 2010 13:46
by aGerman
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