Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

UC4 FTP

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 192.168.10.100 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
alex

Comment on UC4 FTP
Download Code
Re: UC4 FTP
by chilledham (Pilgrim) 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 http://stackoverflow.com/.

    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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://965788]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-08-29 21:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (289 votes), past polls