Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I've recently been presented with the task of getting a file from a FTP/SSL location automatically for a nightly feed. Thus far I've been able to manually do this using MoveIt Freely software that I downloaded and am are able to perform the necesary commands via command line. Now I'm trying to mimic the commands by running a batch file. For example in my batch file, I have:

 

ftps -e:on -a url -user:username -password:password
cd General
get file1.txt C:\My Documents\file2.txt

 

Problem is it executes to login perfectly but then the command tool stays up and never executes the change directory command. I can't seem to find out how to make it execute the second line of the batch file after it logs in. Appreciate any assistance. Also, if someone knows of a better way of performing this task, by all means, suggest a way. Thanks again.

Posted

Try making a .ftp file instead of a .bat file. Then put the commands into the .ftp file directly as you would as if you were using ftp on the command line.

 

open [url]www.myServer.com[/url]
username
password
cd General
mget file1.txt C:\My Documents\file2.txt
...
quit

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...