winscp put -delete problem

Advertisement

pcolina
Guest

winscp put -delete problem

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:


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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: winscp put -delete problem

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/

Reply with quote

Advertisement

You can post new topics in this forum