I have been with you since the beginning and asked 2 or 3 years ago for ftp get *. I believe that a situation when you need to download a content of entire directory is pretty common. I need to ftp get every day entire content of a directory on remote server and names of the files are changing every day as they include the date in the name of the files.
I need to use WS FTP PRO to do that and their scheduler ( would love to use MJT though ). Regards
suggestion for the next release
Moderators: JRL, Dorian (MJT support)
FTP wildcards - get * - put *
get * - I'm using it since years combined with Macro Scheduler:
Run Program>cmd /s ...
... as you're starting the program from a DOS prompt:
ftp [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [computer]
more ...
If you use the -s:filename option, the ftp is a single line within your Macro Scheduler script:
Let>RP_WINDOWMODE=0
Run Program>cmd /s ftp -s:c:\myFTP.txt
The file has to contain all commands (each at a single line) you'd use in a DOS box as you try to connect manually with ftp to a server.
myFTP.txt
open 217.199.172.239
user username password
cd download
get *
cd upload
put *
close
bye
-----
So it's not really necessary to implement all (external FTP) commands as native Macro Scheduler commands.
Run Program>cmd /s ...
... as you're starting the program from a DOS prompt:
ftp [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [computer]
more ...
If you use the -s:filename option, the ftp is a single line within your Macro Scheduler script:
Let>RP_WINDOWMODE=0
Run Program>cmd /s ftp -s:c:\myFTP.txt
The file has to contain all commands (each at a single line) you'd use in a DOS box as you try to connect manually with ftp to a server.
myFTP.txt
open 217.199.172.239
user username password
cd download
get *
cd upload
put *
close
bye
-----
So it's not really necessary to implement all (external FTP) commands as native Macro Scheduler commands.

-
- Newbie
- Posts: 7
- Joined: Sun Jan 25, 2004 12:57 am
it does not work for me
thanks for your hint
I tried to apply..
Run Program>cmd /s ftp -s:ftpmput.txt
takes me to the command prompt withn mjt installation and does not execute ( does not invoke ftp and furher the text file )
Then i tried to run from the second portion from command line
ftp -s:ftpmput.txt
it starts however it does not take the password in the sample syntax
my text file ftpmput.txt
open 111.111.111.111
user myreallogin myrealpassword
put mymessage.txt
close
bye
result
331 User name okay, need password.
530 Not logged in.
Login failed.
ftp> mymessage.txt
Invalid command.
ftp> close
221 Goodbye!
ftp> bye
I tried many combinations providing the password within the text file... no go
could you help again
thanks
mark
ps. I can connect manualy and put the file on the server
I tried to apply..
Run Program>cmd /s ftp -s:ftpmput.txt
takes me to the command prompt withn mjt installation and does not execute ( does not invoke ftp and furher the text file )
Then i tried to run from the second portion from command line
ftp -s:ftpmput.txt
it starts however it does not take the password in the sample syntax
my text file ftpmput.txt
open 111.111.111.111
user myreallogin myrealpassword
put mymessage.txt
close
bye
result
331 User name okay, need password.
530 Not logged in.
Login failed.
ftp> mymessage.txt
Invalid command.
ftp> close
221 Goodbye!
ftp> bye
I tried many combinations providing the password within the text file... no go
could you help again
thanks
mark
ps. I can connect manualy and put the file on the server
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
The sample myftp.txt file did not work for me either. (WIN98SE).
File being sent may need different content depending on the ftp server and/or the ftp software you are using? I modified myftp.txt format as follows:
Just go to a Command Window and manually connect to the ftp site. Make notes of what you need to enter on each line, and modify your "myftp.txt" file as needed.
File being sent may need different content depending on the ftp server and/or the ftp software you are using? I modified myftp.txt format as follows:
This allowed me to connect and get a dir listing. The commands from lumumba can be added once you know you can make a good connection. This may do that for you.open 217.199.172.239
username
password
dir
Just go to a Command Window and manually connect to the ftp site. Make notes of what you need to enter on each line, and modify your "myftp.txt" file as needed.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
-
- Newbie
- Posts: 7
- Joined: Sun Jan 25, 2004 12:57 am
-
- Newbie
- Posts: 7
- Joined: Sun Jan 25, 2004 12:57 am
OK
resuming the problem for others...thanks all for input
I run the macro to upload files on WIN2K server running ServUFTP server
I was finally succesful with the following
assuming your ftpmput.txt file is in c:\temp and the files you want to upload are in c:\temp\upload
create macro as below
Change Directory>c:\temp\
Let>RP_WINDOWMODE=1
Run Program>cmd /c ftp -i -s:c:\temp\mputall.txt
or for troubleshooting
Change Directory>c:\temp\
Let>RP_WINDOWMODE=1
Run Program>cmd /k ftp -i -s:c:\temp\mputall.txt
the mputall.txt is:
cd \upload
open xxx.xxx.xxx.xxx
yourlogin
yourpassword
mput *
close
bye
again thx all for input
mark
resuming the problem for others...thanks all for input
I run the macro to upload files on WIN2K server running ServUFTP server
I was finally succesful with the following
assuming your ftpmput.txt file is in c:\temp and the files you want to upload are in c:\temp\upload
create macro as below
Change Directory>c:\temp\
Let>RP_WINDOWMODE=1
Run Program>cmd /c ftp -i -s:c:\temp\mputall.txt
or for troubleshooting
Change Directory>c:\temp\
Let>RP_WINDOWMODE=1
Run Program>cmd /k ftp -i -s:c:\temp\mputall.txt
the mputall.txt is:
cd \upload
open xxx.xxx.xxx.xxx
yourlogin
yourpassword
mput *
close
bye
again thx all for input
mark