Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 87943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:28:55+00:00 2026-05-10T22:28:55+00:00

I am creating a script on the fly to ftp some files from a

  • 0

I am creating a script on the fly to ftp some files from a remote computer. I create a file which is then called from the command line with

ftp -s:filename proxy 

where filename is the file I just created. The file has code similar to the following:

anonymous@ip address username prompt off binary cd c:\destination directory mget c:\source directory\*.* quit 

That doesn’t work. Neither does the following:

anonymous@ip address username prompt off binary cd c:\source directory mput c:\destination directory quit 

Obviously, I’m not so good at ftp. How, in what order, where in my file do I specify the place where I want the files to be put (destination directory, and also from where the ftp process is running), and where I want the files to come from (ip address computer which has files I want). Do I need to set the directory before starting the ftp process?

I’m running this in an SSIS package, and I’m not using the SSIS ftp task, because I don’t want a failure if no files are found. If there’s nothing there, that’s cool. If there is something there, I want a copy.

(It was working in my development area, and now, when I’m trying to get files from a server that I truely have no access to except ftp, I’m not getting anything. See How to avoid SSIS FTP task from failing when there are no files to download? for an earlier, related question.)

Update: Both of the answers below, listing lcd and cd, are correct. However, my example still failed, until I replaced the backslashes with forward slashes. In other words, my final, working result is as follows:

anonymous@ip address username prompt off binary lcd /destination directory cd /source directory mget *.* quit 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T22:28:56+00:00Added an answer on May 10, 2026 at 10:28 pm

    In most ftp clients you can set the working directory on the server with the command cd, and you set the working directory on the client with the command lcd.

    But it is not clear to me what you are trying to do.

    Are you trying to move or copy files that are on the ftp server to another location on the ftp server? As far as I know you cannot do that with ftp. If you wished to copy files from one folder on the ftp server to another, then I believe you would get a copy to the local system, and then reupload them to a new folder. If you wish to move files you can use the rename command.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a script to read values from csv files and use the
I'm creating a script to take regex input from the command line and process
I'd like if someone could give me some advice on creating this script, which
I am creating a script in JS that will be called from external sites,
I'm creating this script which loads the data from JSON which is encoded in
I am creating some JSON on the fly, serializing it and saving it to
I'm developing gallery in my web application and i was creating script which loads
I am currently creating a script to synchronize users from our company's website onto
I am creating a script to create new folder hierarchies for a friend of
I need to create a script that backups a couple of files on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.