overwrite read-only files

Advertisement

no matter
Guest

overwrite read-only files

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: overwrite read-only files

There's no such option in GUI.

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

Reply with quote

Guest

Re: overwrite read-only files

martin 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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: overwrite read-only files

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.

Reply with quote

Guest

Re: overwrite read-only files

martin 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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: overwrite read-only files

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.

Reply with quote

Guest

Re: overwrite read-only files

martin wrote:

... not implemented ...


Thank you for your response. This is what I wanted to be sure.

Reply with quote

Advertisement

You can post new topics in this forum