I have a laptop which has Lubuntu installed and I have about 30-40GB of videos, documents, pictures and music files on it. I would like to move the data to another hard drive/pendrive and use it on a PC that has Windows installed. The problem is that the data on Lubunutu PC is not "Windows compatible", what I mean is the file names and paths may contain such characters that windows cannot handle (already tried it), like "?" or ":" characters (not my fault I swear). So when I would like to open a directory which contains a not "windows compatible" file or directory on windows, that directory won't be opened, I will get an error.

Of course, I know that I should correct these on a linux machine and It will work on windows, but my question is, How can I move the data to another path and also correct these problems automatically (delete or replace those characters for example)? I don't want to look through thousands of files manually, just to delete such characters, even then I could miss some of it.

  • You understand that with a command line method you can just replace any char by any other char? And all you need is a list of illegal chars? – Rinzwind Mar 14 '16 at 12:07
  • 1
    dupe askubuntu.com/questions/698704/… – Rinzwind Mar 14 '16 at 12:08
  • Yeah, but my father also would like to use something to solve this and he will not use the command line I am sure. – appl3r Mar 14 '16 at 12:47

You should create a 7z-archiv from your files on the linux-box and also extract the files on the windows box with 7z.

While extracting, 7z will rename the files and preserve file and directory timestamps.

Doing it this way, files which names cotains a backslash (\) will be handled unexpected:

A file named "foo\bar" will get extracted to the folder "foo" and be named "bar"

  • I tried it, it looks good. The special characters are replaced with "_", the slashes are deleted. – appl3r Mar 14 '16 at 12:50
  • 1
    Maybe it is worth mentioning, if you have two files and the only difference is a special character, you will be asked if you want to overwrite the first with the second. Example: file 1 "Doc?.doc", file 2 "Doc:.doc", both would be renamed as "Doc_.doc" – appl3r Mar 14 '16 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.