Files not deleting on local system

Advertisement

slacksam
Guest

Files not deleting on local system

Hi,

I am mirroring files & directories from an FTP server to a Windows 7 Pro machine. WinSCP Version is 5.7.5 (Build 5665)

I originally had an issue with windows not supporting a long remote file path. I managed to fix this by putting \\?\ in front of the local path in my script.

The problem I am facing now is that if a file is deleted from the FTP server, WinSCP cannot delete the local version.

Code below shows what I am currently using and the error that appears:
winscp> synchronize local -mirror -delete "\\?\E:\Data\Aust Post" "/Administration/Aust Post"
Comparing...
Local '\\?\E:\Data\Aust Post' <= Remote '/Administration/Aust Post'
Synchronizing...
Error deleting file '\\?\E:\Data\Aust Post\local authority areas.pdf'.
winscp>

Below is what I get in the log:
< 2015-08-27 21:12:39.859 Script: Error deleting file '\\?\E:\Data\Aust Post\local authority areas.pdf'.
. 2015-08-27 21:12:39.859 Script: Failed

Below is what I get if I remove the \\?\:
winscp> synchronize local -mirror -delete "E:\Data\Aust Post" "/Administration/ust Post"
Comparing...
Local 'E:\Data\Aust Post' <= Remote '/Administration/Aust Post'
Synchronizing...
Local 'E:\Data\Aust Post' <= Remote '/Administration/Aust Post'
'E:\Data\Aust Post\local authority areas.pdf' deleted
winscp>

I tried just using the del command in DOS and it worked fine with the original path.

Is there something that can be done to get around either this problem or the issue of long paths?

Thanks.

Reply with quote

Advertisement

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

Re: Files not deleting on local system

Thanks for your report.

This issue has been added to the tracker:
https://winscp.net/tracker/1352

Can you send me an email, so I can send you back a development version of WinSCP for testing? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.

Reply with quote

Advertisement

You can post new topics in this forum