Topic "overwrite read-only files"

Author Message
no matter

Guest


Which option/switch will force WinSCP overwrite without prompts local NTFS/FAT files, having "Read-Only" attribute?

P.S.
Do not push me to "Documentation", if you do not want to answer the question.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
There's no such option in GUI.

If you mean scripting, use batch confirm off (what is the default for scripts).
Guest




prikryl wrote:
There's no such option in GUI.

If you mean scripting, use batch confirm off (what is the default for scripts).


Martin,

Many thanks for your response. I am using scripting in this task, have "batch confirm" turned "off" and it works as expected, until someone put "Read-Only" file into folder, involved in synchronization. "PreserveReadOnly" is not applicable there, because local folder receiving files from remote can be updated directly by local users with files already have "Read-Only" attribute. Now I run script to remove "Read-Only" attributes before running WinSCP script. This resolves the issue but folders tree is huge and re-setting attributes take time. I went through documentation but did not find option/switch can be used to resolve the issue by WinSCP itself. If such option/switch exists, please point me to right place in documentation.

Regards,
Mark
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.
Guest




prikryl wrote:
Please attach a full log file showing the problem (using the latest version of WinSCP).


Martin,

Sure, see attached. The log produced after setting Read-Only attribute to ".banner" file.

C:\tmp\1>attrib C:\tmp\2\.banner
A R C:\tmp\2\.banner

Regards,
Mark
winscp_overwrite_local_readonly_failed.7z (3.11 KB) Private file

Description: unable to overwrite read-only file log

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
OK, I've assumed that by "prompt" you mean a confirmation prompt, that WinSCP displays with SFTP protocol, before overwriting a read-only file.

But you obviously mean an error message that you get with FTP. As with FTP protocol, overwriting read-only files is not implemented.

So there's no way currently, sorry.
Guest




prikryl wrote:
... not implemented ...


Thank you for your response. This is what I wanted to be sure.
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