Topic "MV command and change file namn"

Author Message
Lars
[View user's profile]

Joined: 2016-05-30
Posts: 1
I need do add a text (string) to existing filename.

Example:

File before: 4827392021.xml
File after name change: finish4827392021.xml

how can i do this with MV command?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
For one file: mv 4827392021.xml finish4827392021.xml.

But if you mean how to do this en masse, it's not possible.

But it's easy to script this using for example PowerShell script with WinSCP .NET assembly.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
I have added an example to the documentation:
https://winscp.net/eng/docs/library_example_advanced_rename
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