Topic "Possible to move files after transfer?"

Author Message


Here is the situation. I am using a batch script to do the transfers.
I have a large number of files on a remote host that are in separate folders and sub folders.
What I would like to do, is after the remote files and folders are transferred to the local host, either move or delete just the files from the remote host but leave the folders intact. I would prefer to move them to another folder but deleting them would have to do if it's the only way. Is this even possible?
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24755
Location: Prague, Czechia
We have an example for Moving local files to different location after successful upload.
For opposite direction, the code will be mostly the same, except that for remote files you use $session.MoveFile instead of Move-Item.

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License