Topic "offending chars in path/filenames"

Author Message
a2z

Guest


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.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
WinSCP automatically (by default) replaces such characters with underscore. See documentation.
_________________
Martin Prikryl
a2z

Guest


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?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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 Sad

Quote:
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
Guest




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


Smile

I stand for silent masses <g>


Quote:
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
What about replacing the offending character with %XX, where XX is ASCII code in hexa and restoring original character on upload?
_________________
Martin Prikryl
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
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
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