0

I want to be able to create a batch file that will log on to a specified FTP. Then I want it to change to a different directory within the FTP. Get a directory listing and save it to a text file on my local computer. Below are the listed steps in further depth.

  1. Log on to FTP called "Transfer1"
  2. Change to directory "Calls"
  3. Get directory listing of "Calls"
  4. Put directory listing in text file called "Logger1.txt"
  5. Exit.

Inside the log I would something like

    Volume in drive C is Windows7_OS
 Volume Serial Number is 0C7F-0C9A

 Directory of C:\DownloadedCalls

07/17/2014  12:12 PM    <DIR>          .
07/17/2014  12:12 PM    <DIR>          ..
07/17/2014  12:12 PM                 0  2014-07-17.txt
07/17/2014  12:07 PM               532 .txt
07/17/2014  12:06 PM               487 DirContents.txt
07/17/2014  12:12 PM               457 File_Verification_Local.bat
07/17/2014  12:04 PM               153 File_Verification_Remote.bat
07/17/2014  12:11 PM               387 test.bat
               6 File(s)          2,016 bytes
               2 Dir(s)  164,147,605,504 bytes free

Please help!

1 Answers1

0

You can do this in one line using cURL:

curl ftp://username:password@hostname.tld/path/to/directory/

To store the results to a local file, just use redirection.

mti2935
  • 11,465
  • 3
  • 29
  • 33