Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Any idea How I download all files EXCEPT filenames containing the current month and Year

Any idea how I download all files EXCEPT filenames containing the current month and year.
So if the current month is 06-2024
and the remote server has a file called 05-2024 and another called 06-2024, I want to just download last months filename 05-2024.
I want to embed the commands in a batch file by the way.

Log file now uploaded as requested

I have now added the log file as suggested. I tried the command with and without the Delete command to see if that helped
I tried both

as well as

I have double checked that the foldername exists on the remote server.

Re: %TIMESTAMP% Command not downloading previous month's file – any advice?

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

%TIMESTAMP% Command not downloading previous month's file – any advice?

I am trying to get the WinSCP command line to download a file that has last month's (April) Month (MM) and Year (YYYY) number embedded within the filename.
Time of writing is 17th May 2024 so I am expecting the command below to download my April 2024 file located on the remote server – Filename is 042024.CSV
The syntax I am using is:

The script output is:-
No file matching '*%TIMESTAMP-M#MMYYYY%*.CSV' found.

Does anyone have any ideas please
I am using the latest version of WinSCP - 6.3.3
(Time of writing is 20/5/24)