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

Ask A Question

Stats

  • Questions 69k
  • Answers 69k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer The way to detect CAPS LOCKS is to check the… May 11, 2026 at 12:27 pm
  • added an answer link needs /DEBUG. May 11, 2026 at 12:27 pm
  • added an answer The WWW-Authenticate header looks malformed, try: WWW-Authenticate: Basic realm='My Realm' May 11, 2026 at 12:27 pm

Related Questions

Call me a 'n00b', but I am new to creating Script Controls. I want
I am creating an ASP script that uses the application object to store the
We have customers who, for unassailable reasons, cannot use SQL Server's built-in backup features
I am working on some schema changes to an existing database. I backed up

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.