Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to specify source and destination FTP directories in script task?
    primarykey
    data
    text
    <p>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</p> <pre><code>ftp -s:filename proxy </code></pre> <p>where filename is the file I just created. The file has code similar to the following:</p> <pre><code>anonymous@ip address username prompt off binary cd c:\destination directory mget c:\source directory\*.* quit </code></pre> <p>That doesn't work. Neither does the following:</p> <pre><code>anonymous@ip address username prompt off binary cd c:\source directory mput c:\destination directory quit </code></pre> <p>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?</p> <p>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.</p> <p>(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 <a href="https://stackoverflow.com/questions/140850/the-best-way-for-a-ssis-ftp-task-to-not-fail-when-there-are-no-files-to-copy">How to avoid SSIS FTP task from failing when there are no files to download?</a> for an earlier, related question.)</p> <p><strong>Update:</strong> 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:</p> <pre><code>anonymous@ip address username prompt off binary lcd /destination directory cd /source directory mget *.* quit </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload