offending chars in path/filenames

Advertisement

a2z
Guest

offending chars in path/filenames

Hi Martin,

I have a couple of million mail files in a Linux box and I want to copy these files to a Windows box.

The trouble is, these filenames contain chars that are forbidden in Windows --such as ':' etc.

How do I automagically substitute a char (of my choice) for those offending chars during the copy operation?

Thank you for WinSCP -- a life saver.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: offending chars in path/filenames

WinSCP automatically (by default) replaces such characters with underscore. See documentation.
_________________
Martin Prikryl

Reply with quote

a2z
Guest

Re: offending chars in path/filenames

True. I have read the docs.

But, WinSCP replaces them what WinSCP considers best.

Could you let us specify our own replacement characters.

And, one more thing: if a filename/path collision arose
due to char replacement; how does WinSCP handle that?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: offending chars in path/filenames

a2z wrote:

Could you let us specify our own replacement characters.
I'll consider that. However you are the first one asking for this, so it has low priority, sorry :-(

And, one more thing: if a filename/path collision arose
due to char replacement; how does WinSCP handle that?
It does not handle that. The later file will overwrite the older one.
_________________
Martin Prikryl

Reply with quote

Guest

Re: offending chars in path/filenames

I'll consider that. However you are the first one asking for this, so it has low priority, sorry

:-)

I stand for silent masses <g>


It does not handle that. The later file will overwrite the older one.

Actually, if there were 'make unique' option (like GetRight etc.) I might not need the replacement chars to be of my own choice. But, overriting a file due to char replacement is not really acceptable because you will never know what has been overwritten.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: offending chars in path/filenames

What about replacing the offending character with %XX, where XX is ASCII code in hexa and restoring original character on upload?
_________________
Martin Prikryl

Reply with quote

Guest

Sounds great! I notice this is now implemented but apparently for downloads only, the substituted charcters are not replace on upload yet? Thanks very much for WinSCP.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Anonymous wrote:

Sounds great! I notice this is now implemented but apparently for downloads only, the substituted charcters are not replace on upload yet? Thanks very much for WinSCP.
Not yet.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum