Topic "Error when deleting files after sync"

Author Message
SsjCosty
[View user's profile]

Joined: 2015-03-17
Posts: 2
Hi, I am executing a script file with winscp.com, and I always get an error after successfully synchronizing a folder using a file mask, but I don't get the error if I don't use the file mask.

Here is the section in question, with a few comments about what happens:

Code:
mkdir /web-biz/myproj_upload
synchronize remote -filemask="| */Scripts/" C:\Work\myproj /web-biz/myproj_upload
mv /web-biz/myproj /web-biz/myproj_backup
mv /web-biz/myproj_upload /web-biz/myproj
rmdir /web-biz/myproj_backup


After executing that code, all files get uploaded, but afterwards I get 3 errors ("Error deleting file"). However, if I remove the -filemask="| */Scripts/" option from the synchronization, everything works fine!

What might be the problem?

The thing is I'm trying to exclude the "Scripts" folder from the root folder, but only that. I tried with putting the absolute path in the file mask (like this: -filemask="| C:\Work\myproj\Scripts\") but I get the same error afterwards.
So if I have:
Quote:
C:\Work\myproj\Scripts\
C:\Work\myproj\Extra\Scripts\

i only want to exclude the first folder.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. 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.
_________________
Martin Prikryl
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