I have an old CD with Amiga files on that I want to copy to my modern Windows 7 PC.

Most files are read fine, but when Windows finds a file with a problematic filename, it only allows you to skip that file. It won’t automatically copy the file and remove the forbidden characters (such as '?' or '|') in it at the same time.

I want those supposedly “forbidden” files. How do I get Windows to automatically rename them as it copies and continue with the rest?

I’ve tried the following file manager programs, all without success. I even tried to dip into the options for each program to hopefully use its own custom copy method:

  • FreeCommander XE (has its own copy routine, but still fails)
  • XYplorer (has its own copy routine, but still fails)
  • Double Commander
  • Directory Opus 11 64-bit. (Pro edition)
  • xplorer²
  • Q-Dir
  • Unreal Commander
  • NexusFile
  • Total Commander
  • My Commander
  • Nomad.NET
  • Just Manager
  • Have you tried using a Linux live CD? – harrymc Nov 8 '14 at 12:44
  • Try a Live CD with a simple bash script, I can try to find one that will automatically change filenames, do you need the actual filenames, or can it be: xxx1, xxx2? – QuyNguyen2013 Nov 8 '14 at 14:20
  • Actual filenames if possible. No Windows utility? I suppose if I were to go the emulation route I could use WinUAE with some effort... – Dan W Nov 8 '14 at 18:59
  • I have no idea if it'll work but have you tried codesector.com/teracopy – Touff Nov 9 '14 at 16:18
  • Thanks - tried Teracopy. Same error as normal - it can't read the file. – Dan W Nov 12 '14 at 6:03

The solutions you mentioned are all generic file managers. I suggest to take a look at tools that are specifically made to image and copy optical media.

I'm not a fan of promoting commercial software here, but I used IsoBuster multiple times for very similar issues quite successfully. The good news: they have a (limited functionality) free version so you can try it out before you buy it.

  • Wow, your suggestion actually works. I did solve it in the end using WinUAE, but for many users it would be a hassle to set up WinUAE, install Workbench, find the right ROMs etc. So your answer will be the one that gets the bounty! – Dan W Nov 13 '14 at 21:16

Try the cp utility I supply with my Hamilton C shell. (Full disclosure: I'm the author.) Internally, I used Microsoft's new long UNC format (using the \\?\ prefix) intended to allow access to files and directories with names containing arbitrary characters. I doubt many other vendors are using this yet. You can try this with the free demo version.

cp doesn't include an auto-renaming feature, so this part you'll have to do in one of a couple ways.

  1. You may be able to cp the entire directory onto your hard disk with the odd names, then mv things around to your liking. Create a directory first, then cp everything into the directory. If the experiment fails and you're stuck with some names you can't specify on the command line, you can rm -x the whole directory and start over.
  2. You could write a script that copies all the odd-named pieces individually, specifying how each piece is to be renamed on the the command line to cp. This script could be little more than a long list of cp commands you've edited, perhaps starting with a list of filenames generated by ls -r1.

Please let me know how it works out. You're welcome to contact me offline if I can be helpful.

  • Tried your first option. It will copy the other files, but when it gets to the filename with the '?' char, it fails to copy over. Error is "The output filename isn't valid". I assume therefore the second option won't work either. – Dan W Nov 12 '14 at 6:08
  • No, the second one should work. What it's telling you is that it can read the file on the CD but that Windows will not let it create a file with that name on your hard drive. You can still, one-by-one, specify how you'd like each of those other files renamed as you copy them into Windows-compliant names. Try copying just one. If that works, the next step is a big (but very simple) script that does that same one-by-one copy for each odd-named file. – Nicole Hamilton Nov 14 '14 at 23:53
  • Just saw above that you solved your problem. Good for you. – Nicole Hamilton Nov 14 '14 at 23:56
  • It's solved as you know, but I'm interested to see if your idea will work too. But IIRC, I did try a single file with: cp <source> <destination> ...and that didn't work. Is that what you thought I should try? – Dan W Nov 15 '14 at 16:35
  • Yes, do one file but be sure to specify a Windows-legal name as the destination filename. – Nicole Hamilton Nov 25 '14 at 16:16

You should be able to do this from the command line in Windows fairly easily. Specifically renaming WHILE copying I am not sure. But, I have been able to move 'forbidden' files by changing or removing the file extention.Then copying them and adding the file extension back.

Open Command prompt. Navigate to the folder where your files are.

cd C:\File\Directory\With\Your\Files

ren *.txt *.doc

Better yet.Here is a link to something previously written: http://www.windows-commandline.com/rename-file-extensions-bulk/

Maybe this will help.

  • Unfortunately, the CD is read only, so I can't rename files in place. – Dan W Nov 12 '14 at 6:06

Check out the answer to: How can I mass rename files?

Bulk Rename Utility is the top answer, which has copy options, and regex match/replace options.

Checking the manual, they also have a 'Remove Symbols' option:

Note that the "Remove Symbols" option removes the following symbols (some of which are not valid
in filenames anyway):
! £ $ % ^ & * ( ) - _ = + [ ] { } ; : ' @ # ~ , .  / ? \ | ` ¬ ¦
  • The CD is read only, and Windows can't open the (dodgy filenamed) file to copy it anywhere else. – Dan W Nov 13 '14 at 21:06

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.