Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister


by bontyal
on Apr 18, 2012 at 19:36 UTC ( #965788=perlquestion: print w/replies, xml ) Need Help??
bontyal has asked for the wisdom of the Perl Monks concerning the following question:

hello all I'm trying to write an FTP script that will use a Mget to locate text files on ftp site then either open a batch file or if i can just unzip the file straight from the script i wont need to use the batch file. this is what i have so far
ftp << EOD open user username password lcd C:\ftp mget testfile1 #EOD :restart Copy copy *.zip T:\FTP-EDS\Storage\ @set retcode=%errorlevel% @if NOT %ERRORLEVEL% == 0 goto :retcode :restart Move move *.zip T:\FTP-EDS @set retcode=%errorlevel% @if NOT %ERRORLEVEL% == 0 goto :retcode :restart Cd cd /d T:\FTP-EDS @set retcode=%errorlevel% @if NOT %ERRORLEVEL% == 0 goto :retcode :restart Del del XEDS /q @set retcode=%errorlevel% @if NOT %ERRORLEVEL% == 0 goto :retcode :restart Unzip T:\FTP-EDS\Batch\winrar e -pBSCU14CNS *.zip @set retcode=%errorlevel% @if NOT %ERRORLEVEL% == 0 goto :retcode :restart delzip del *.zip /q @set retcode=%errorlevel% @if NOT %ERRORLEVEL% == 0 goto :retcode :restart rename ren *.* XEDS @set retcode=%errorlevel% @if NOT %ERRORLEVEL% == 0 goto :retcode thanks in advance

Replies are listed 'Best First'.
by chilledham (Friar) on Apr 18, 2012 at 20:15 UTC

    Welcome to Perlmonks, bontyal!

    I don't see anything Perl related in your question. While many monks here in the Monastery are experts in non-Perl topics your question will be better posed to another forum, perhaps

    That said, seeing UC4 in your title leads me to believe you're working with some sort of scheduler of theirs. Could their support staff be of assistance to you?

      You can use unix shell scripts, or you perl to accomplish this. It looks like you are trying to build this using UC4 code use a scripting or unix like language. Much easier.
        If you still need help with this please respond I can send you some code examples, but DUMP the UC4 code yuck.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://965788]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2018-04-26 19:56 GMT
Find Nodes?
    Voting Booth?