List last modified files using FTP Command-line

So let's say my FTP client is not the most expensive (was FREE), nor the most advanced client out there, and I want to know what were the most recent files I modified and uploaded to a site, how do I do it using just Microsoft Windows?

I don't have a clue. Here's what I've got so far:

  1. Open a command-prompt (Start > Run > Type COMMAND > OK)
  2. Type ftp my_ftp_host (where "my_ftp_host" is the hostname or IP of the server holding my site)
  3. Enter login credentials
  4. Type dir (lists files & folders in the current remote working directory)
  5. Type cd /path/to/my/website to change directory to the root folder containing your website.
  6. Type pwd to confirm the remote working directory is the current directory.
  7. Type lcd to confirm what the local working directory is (when you download or print output, it will save to this folder on your computer). Can type lcd <another_working_directory> if you want to change this (leave blank to simply display what current local working directory is).
  8. Type dir -S . temp.txt which will output all files including subdirectories to temp.txt in your local working folder.

Additional Notes
  • the switch "-S" does not work on certain systems (at least not accompanied with the command to output to a local file. Type dir . temp.txt to output the current remote directory list of files to the local file temp.txt.

Other Searches
  • msdos ftp print server directory to local file

Credit where Credit is Due:

Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: The information on this website is provided without warranty and any content is merely the opinion of the author. Please try to test in development environments prior to adapting them to your production environments. The articles are written in good faith and, at the time of print, are working examples used in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman

Related Articles

Joes Revolver Map


Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Donate to Joel Lipman via PayPal

Donate to Joel Lipman with Bitcoin - Valid till 8 May 2022 bc1qjtp4l4ra452wzvuk9a45yfj82zkahsyy2z379y
© 2023 Joel Lipman .com. All Rights Reserved.