Download newest file

Advertisement

zetrrux
Joined:
Posts:
1

Download newest file

Hi!

I need a script to download the newest file from the newest folder in cmd. A new folder is created every week. I made a script that can download the latest file from a folder, but I have to rewrite the download path every week. Please help how can I make it.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,587
Location:
Prague, Czechia

Re: Download newest file

Unless you can "calculate" the name of the weekly folder somehow, you cannot use simple scripting.

You will have to use a more powerful language, like PowerShell, with a use of WinSCP .NET assembly.

You can start with this script:
https://winscp.net/eng/docs/script_download_most_recent_file#powershell

You just need to repeat the latest file selection for both the folder and the file.

Reply with quote

Advertisement

You can post new topics in this forum