5

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
5
  • Have you tried using a Linux live CD?
    – harrymc
    Commented Nov 8, 2014 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? Commented Nov 8, 2014 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...
    – Twinbee
    Commented Nov 8, 2014 at 18:59
  • I have no idea if it'll work but have you tried codesector.com/teracopy
    – Touff
    Commented Nov 9, 2014 at 16:18
  • Thanks - tried Teracopy. Same error as normal - it can't read the file.
    – Twinbee
    Commented Nov 12, 2014 at 6:03

4 Answers 4

4
+50

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.

1
  • 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!
    – Twinbee
    Commented Nov 13, 2014 at 21:16
1

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.

5
  • 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.
    – Twinbee
    Commented Nov 12, 2014 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. Commented Nov 14, 2014 at 23:53
  • Just saw above that you solved your problem. Good for you. Commented Nov 14, 2014 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?
    – Twinbee
    Commented Nov 15, 2014 at 16:35
  • Yes, do one file but be sure to specify a Windows-legal name as the destination filename. Commented Nov 25, 2014 at 16:16
0

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.

1
  • Unfortunately, the CD is read only, so I can't rename files in place.
    – Twinbee
    Commented Nov 12, 2014 at 6:06
0

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):
! £ $ % ^ & * ( ) - _ = + [ ] { } ; : ' @ # ~ , .  / ? \ | ` ¬ ¦
1
  • The CD is read only, and Windows can't open the (dodgy filenamed) file to copy it anywhere else.
    – Twinbee
    Commented Nov 13, 2014 at 21:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .