Timestamp and file extension

Advertisement

ChrisM
Joined:
Posts:
2

Timestamp and file extension

I am trying to download (get) a file with a filename in the following format:

xxxxxx_21122016.txt

I am using the %TIMESTAMP% wildcard as follows:

xxxxxx_%TIMESTAMP#ddmmyyyy%.txt however when I run the script it reports that it can't find xxxxxx_21122016.tx i.e. the final letter of the file extension is missing. I have tried various types of quotes but these then appear in the filename. I have googled but nothing seems to suggest a solution. Any suggestion would be appreciate.

N.B. We are using WinSCP.5.9.3 with the commands in a text file called by a batch file.

Many Thanks
Chris

Reply with quote

Advertisement

Makc666
Joined:
Posts:
50
Location:
MSK-RU

Re: Timestamp and file extension

Chris, show the script or that line from the script?

Did you try to change extension lets say to .zzz for text purposes? When you change to .zzz it also says it can't find the file with .zz (missing one letter)?

Did you check server's logs? Which file WinSCP is trying to download in server's logs?
Last edited by Makc666 on 2016-12-23 12:53; edited 1 time in total

Reply with quote

ChrisM
Joined:
Posts:
2

Timestamp and filename

Hello Makc666 I have just tried using a file extension of zzz and it is correctly interpreted. Having looked at the job again I notice there is a space in the destination folder which I had (foolishly) assumed was only one space but was actually 2. Having sorted that out it now works. That said it still reported the remote file name as *.tx but still transfers.

Thanks you for your help!

Chris

Reply with quote

Makc666
Joined:
Posts:
50
Location:
MSK-RU

Re: Timestamp and filename

ChrisM wrote:

That said it still reported the remote file name as *.tx but still transfers.

Chris, where WinSCP reports this one?

Can you show screenshot?
And also attach some logs from WinSCP (removing sensitive data)?

Reply with quote

Advertisement

You can post new topics in this forum