Root folder deleted using PutFiles with remove switch enabled

Advertisement

torix
Joined:
Posts:
16
Location:
Norway

Root folder deleted using PutFiles with remove switch enabled

I observe that when using the PutFiles-method, the root folder given as source is deleted as well. Eg. defining "C:\TEMP\DATA" as a source, the DATA folder is deleted too. I tried "C:\TEMP\DATA\" as source but with the same result.

Short question then : how can I keep the source folder?
(yes, an option would be to create it afterwards)

Reply with quote

Advertisement

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

Re: Root folder deleted using PutFiles with remove switch enabled

Use C:\TEMP\DATA\* to upload (and delete) just files (and subdirectories) in the directory, not the directory itself.

Reply with quote

torix
Joined:
Posts:
16
Location:
Norway

Re: Root folder deleted using PutFiles with remove switch enabled

torix wrote:

I observe that when using the PutFiles-method, the root folder given as source is deleted as well. Eg. defining "C:\TEMP\DATA" as a source, the DATA folder is deleted too. I tried "C:\TEMP\DATA\" as source but with the same result.

Short question then : how can I keep the source folder?
(yes, an option would be to create it afterwards)

This worked great however, the files in the C:\TEMP\DATA folder itself are not moved, just sub folders and the contents within these.

Reply with quote

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

Re: Root folder deleted using PutFiles with remove switch enabled

torix wrote:

This worked great however, the files in the C:\TEMP\DATA folder itself are not moved, just sub folders and the contents within these.
Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

You can post new topics in this forum