Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Guest

How can I use Move-Item to overwrite the already existing file in local disk?

Hi,

I have used the reference code provided in https://winscp.net/eng/docs/script_local_move_after_successful_upload

Now I have a situation where I can get same file multiple times to upload. So I would like to transfer the uploaded file to different folder in local machine for e.g. "\Sent". If file with the same name already exists it doesn't move the file.
Please suggest.

Thanks & Regards,
Nishant
WalterS

Possible to move files after transfer?

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?