Topic "Renaming local files"

Author Message
janiop

Guest


I am new to WinSCP and in my script I put a file to a remote directory but I want to rename the local version by adding YYMMDD in the file name. How can I accomplish this?

Newbie
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Do you mean you want to upload the file using its original name and after the upload archive the original local file by appending the timestamp to its name?
janiop

Guest


Exactly.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
There's a very similar example available:
http://winscp.net/eng/docs/script_local_move_after_successful_upload
janiop

Guest


thanks but it doesn't tell me how to add the timestamp.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
janiop wrote:
thanks but it doesn't tell me how to add the timestamp.

Well, that's not a task for WinSCP.
Simple google search will give you a solution.
See for example http://stackoverflow.com/q/17996936/850848
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