Using get -latest /home/user/* c:\downloaded\

Advertisement

tannercortes
Guest

Using get -latest /home/user/* c:\downloaded\

Hello:

I downloaded and installed the beta version so that I could utilize this new feature, which I'm assuming would get me the latest file based on the filedate within specified folder.

I need to get the latest file on the root of the FTP server and tried the following command. However, it started downloading all files in all subdirectories.

get -latest /* C:\RAW Source\

Is this command not for what my intention is?
Or if so, can you help me understand/fix?
Thanks

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Using get -latest /home/user/* c:\downloaded\

Your command will pick the latest file or directory in the root folder and download that. So if the newest entry is a (sub)directory, it will download that directory.

If you are interested in files only, exclude the directories:

get -latest /* -filemask=|*/ "C:\RAW Source\"

See https://winscp.net/eng/docs/faq_script_non_recursive

Reply with quote

Advertisement

You can post new topics in this forum