suggestion for the next release

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
marek dydecki
Newbie
Posts: 7
Joined: Sun Jan 25, 2004 12:57 am

suggestion for the next release

Post by marek dydecki » Sun Jan 25, 2004 1:13 am

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

Lumumba

FTP wildcards - get * - put *

Post by Lumumba » Sun Jan 25, 2004 10:56 am

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. :wink:

marek dydecki
Newbie
Posts: 7
Joined: Sun Jan 25, 2004 12:57 am

it does not work for me

Post by marek dydecki » Sat Feb 14, 2004 5:01 pm

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

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Feb 14, 2004 7:43 pm

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:
open 217.199.172.239
username
password
dir
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.


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!

lurker

Post by lurker » Sun Feb 15, 2004 12:21 am

Many systems don't accept get or put for multiple file transactions, the commands are mget and mput.

marek dydecki
Newbie
Posts: 7
Joined: Sun Jan 25, 2004 12:57 am

Post by marek dydecki » Sun Feb 15, 2004 12:50 am

Bob
you are right
it worked for me
stupid I did not try to skip user
and just enter

login
pass

in the text file as you suggested

by the way

regrding lumumba's suggestion I found it works when you apply

cmd /k not cmd /s
thanks again
:wink:

marek dydecki
Newbie
Posts: 7
Joined: Sun Jan 25, 2004 12:57 am

Post by marek dydecki » Sun Feb 22, 2004 1:13 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

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts