Topic "winscp put -delete problem"

Author Message
pcolina

Guest


Hi everyone,

I'm trying to upload some files to a remote server using a winscp script with deletion of the file uploaded, but instead of just deleting the files, it deletes all directory.

Could you tell me where is my mistake?

My script looks like:


Code:
put -delete "C:\TEMP\Out\" /targetFolder/
close
exit


After finishing the process, the files content has been uploaded, but the Folder "out" (with all its content) has been also deleted.

Can anyone help me?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
You are uploading folder Out, right? The Out is moved to the remote directory (/targetFolder/Out is created). So Out is also removed.

If you want to move just files, use
put -delete "C:\TEMP\Out\*" /targetFolder/
pcolina

Guest


Thank you! Working perfectly now!
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