Topic "Problem with "new" timestamp function"

Author Message
Guest




I tried to make a batch import script for backup my ftp location.

I download the folder "html" to my external drive "S:" on the external drive is an folder "backup".
In the "backup" folder I like to make a new folder with a timestamp as name.

get "/html" "S:\backup\%%TIMESTAMP%%\"

The problem now is that it doesnt use the timestamp function, but "%%TIMESTAMP%%" as text?

Is ther anyone that can help me?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Why did you double the %? (if there's anything in the documentation that suggest this, please let us know, so that we can improve it).

It should be:
get "/html" "S:\backup\%TIMESTAMP%\"

Also make sure you are using the latest release of WinSCP, 5.6.x RC. Or 5.7 [stable] - to be released in few hours.
_________________
Martin Prikryl
Guest




I download the new version 5.7 and after replacing %% for % the problem is solved.

I found the %% on the page https://winscp.net/forum/viewtopic.php?t=14876
I tried this when I was troubleshooting my problem;-)
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Anonymous wrote:
I found the %% on the page https://winscp.net/forum/viewtopic.php?t=14876
I tried this when I was troubleshooting my problem;-)

You have pointed back to your own topic by mistake. Please try again Smile
Guest




prikryl wrote:
Anonymous wrote:
I found the %% on the page https://winscp.net/forum/viewtopic.php?t=14876
I tried this when I was troubleshooting my problem;-)

You have pointed back to your own topic by mistake. Please try again Smile


Oops... https://winscp.net/eng/docs/scripting
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia

OK. That's for a batch file (.bat), not script file. Feel free to suggest a better wording to make it more clear.
_________________
Martin Prikryl
Guest




prikryl wrote:

OK. That's for a batch file (.bat), not script file. Feel free to suggest a better wording to make it more clear.


The wording is fine, I just tried for troubleshooting my problem.

Thanks for the great respondings!
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License