Automatic character substitution for illegal characters


#1

I have over 1500 files that are showing up as ‘not allowed’ because of invalid characters. I understand many valid characters for cloud storage objects are invalid for windows filesystem. However, the solution of just skipping those files is inadequate and frustrating.

It would take me forever to go through and rename each of those files by hand to remove any invalid characters (quotes, vertical bar, question mark etc.) If I remember correctly Google Drive simply mapped invalid characters to safe characters on the target operating system but stored the original name in metadata to maintain the appropriate association between the objects.

Even an option that would allow me to select that mode if the user preferred would be nice!


#2

Hi @mark.ericson,
Thanks for the feedback. We used to perform character substitution but it ended up creating more problems than it solved. Most users that run into this don’t run into this at the scale you do and it is more manageable, so I understand your frustration.

We don’t have any current plans to add automatic substitution, but I have moved this over to the Feature Requests section for better tracking.

A couple possible options

  • If you have access to a MacOS or Linux system, it should be possible to bulk rename through a little scripting, since those Operating Systems will not have issues with most of the characters.
  • There appear to be some solutions for bulk renaming in Google Drive, like this extension. I haven’t tried it so I can’t comment on its effectiveness, but it might be worth investigating.

#4

I had thought of doing some shell scripting to bulk rename, and that is a fine idea.

However, I have to bulk rename in the cloud, not locally on Google Drive. Not sure how to effectively do that now that I have abandoned Google Backup & Sync for ODrive. I can’t rename locally because ODrive doesn’t sync the files, and I don’t have a shell to rename the files within Google Drive.

I still wish ODrive did what Google Drive does, maps the file names to legal characters on the local device so the files are accessible. It would even be possible to flag them as having invalid characters and give the user an opportunity to rename them locally.


#5

Hi @mark.ericson,
Did you take a look at the extension I posted above? Is that a possibility?


#6

Yes, but that is a bit of a hack workaround from my perspective.

What is the standard for which characters are valid and not valid? There are a huge number of file systems out there and if I want to share files across Mac, Windows, and hopefully Linux in the future, I don’t want to have to rename files from those other systems just to satisfy Windows.

I think the Google Backup & Sync solution is much better in that it maps the invalid characters for windows file systems to valid ones, but does not change the filename in the cloud.


#7

Hi @mark.ericson,

odrive will only have an issue if the system you are on does not allow the characters (it gives odrive an error when it tries to create the file on the local filesystem).

We had something like this in place in the past, but it ended up being problematic, so it was removed. I have asked the product team to take another look, but it is probably not likely to make a reappearance any time soon.


#8

OK, thanks,.

When I was considering renaming all the offending files I realized it would result in a loss of information for my Macintosh collaborators. So, I’m forced to decide now… “least common denominator” approach for file naming or not having those files available to Windows user.