Cross platform filenames / Illegal characters?

MacVault

macrumors 65816
Original poster
Jun 10, 2002
1,154
59
Planet Earth
Every time I try to back up files from my iBook(OS X) to a shared Windows volume the copy process is always terminated before all files are copied. The error usually says there are strange characters in the filenames of the files being copied. THIS IS ANNOYING AS H-LL!

Why doesn't the OS tell me ahead of time before I've waited an hour for half the files to copy? Seems like it would be smart enough to do that.

What is the best way to deal with this? Would this be a problem if I was copying to a Linux share? Is there some program to scan all my OS X files and replace any incompatible characters? Is there some other file system format I should use to format the Windows volume? Is this even a file system problem? Or is it a SMB limitation?

Any suggestions would be appreciated!
 

Soulstorm

macrumors 68000
Feb 1, 2005
1,887
1
I have not encountered such problems... but here is the thing:

--Make sure that you have files with names up to 32 chars and not more
--Make sure you exlcude characters like "!@###$%^&*" from your filenames

Ask a PC user for more information...
 

Mechcozmo

macrumors 603
Jul 17, 2004
5,215
2
Lemme put it to you this way:

Windows sucks in this regard. A lot of characters that it doesn't like. Major pain in the ass. I don't know about Linux shares.... but it is the FAT16/32/NTFS file systems that are the annoying ones I think.
 

pulsewidth947

macrumors 65816
Jan 25, 2005
1,106
2
Illegal Characters in Windows: ? [ ] / \ = + < > : ; " , * |
(and if your using the FAT file system ^)

If in doubt stick to the 8.3 method: filename.ext (8 letters for filename, 3 for extension). Windows 2000/XP should be able to cope with 32 letters for filename, but in case it doesnt you know what to do now :)

I found that here.
:EDIT: This is another great resource. You cant have any files named - com1, com2, com3, com4, com5, com6, com7, com8, com9, lpt1, lpt2, lpt3, lpt4, lpt5, lpt6, lpt7, lpt8, lpt9, con, nul, or prn.

I cant say I've ever had problems transfering, maybe thats because I used Windows for so long I never put illegal characters in my Mac filenames :D
 

MacVault

macrumors 65816
Original poster
Jun 10, 2002
1,154
59
Planet Earth
AHHHHHHH! I can't beleive I'm the only one with this problem! I don't intentionally use strange characters in my filenames, but here's an example of the problem.... I go to a website such as... http://www.pilotjournal.com/content/products/ and it's title is... Pilot Journal | Cleared To Go | July/August 2005

Notice the | (pipes) in the title.

...so I bookmark or save this website. By default it uses the title of the page as the filename. I then try to backup my documents or library directories. It copies a bunch and then an error box pops up saying it can't go any further. I've also had such problem when trying to backup my Pictures directory. Does iPhoto use windows-illegal characters?

The most frustrating thing is... OS X SHOULD TELL YOU WHAT FILE IS THE PROBLEM -> AND THEN GIVE YOU THE OPTION TO ***SKIP*** THAT FILE! Why would this be so hard???? Why can't it give this option rather than skip the file? THIS IS MAJOR STUPIDNESSSSSSSSS! WTF!!!

Is there any program out there that will do a search-and-replace on filenames so I can fix this crap?
 

f-matic

macrumors member
Jan 6, 2003
83
0
brooklyn
I've had this problem many times -- Windows is really aggravating about illegal file names, and it also complains about overly long file names too (if you're copinyg something to a deeply nested folder, for example). I did a quick google for you and came across this -- no idea if it's good or not, but it seems to directly support batch conversion of Mac OS X files to Windows-legal file names...

http://www.publicspace.net/ABetterFinderRename/
 

MisterMe

macrumors G4
Jul 17, 2002
10,650
28
USA
MacVault said:
....

The most frustrating thing is... OS X SHOULD TELL YOU WHAT FILE IS THE PROBLEM -> AND THEN GIVE YOU THE OPTION TO ***SKIP*** THAT FILE! Why would this be so hard???? Why can't it give this option rather than skip the file? THIS IS MAJOR STUPIDNESSSSSSSSS! WTF!!!

....
Huh! It is not Apple's responsibility to support every iteration of Win/DOS limitations. It was your choice to use a Win/DOS volume to store your files. It is your responsibility to be aware of your volume's limitations and to work around them.
 

MacVault

macrumors 65816
Original poster
Jun 10, 2002
1,154
59
Planet Earth
MisterMe said:
Huh! It is not Apple's responsibility to support every iteration of Win/DOS limitations. It was your choice to use a Win/DOS volume to store your files. It is your responsibility to be aware of your volume's limitations and to work around them.
I'm not blaming Apple for the limitations of Windows filesystem. I am blaming Apple for not making an option to SKIP a file rather than kill the whole copy process when an error comes up.

Furthermore, according to this page about a Linux fileserver... http://www.rebyte.com/content/view/126/ , it appears that this isn't just a problem when using Windows volumes. Sounds like this I'd have the same problem when copying to a Linux volume, or maybe the problem is a limitation of SMB (samba).
 

scionfriar

macrumors member
Apr 26, 2005
35
0
f-matic said:
I've had this problem many times -- Windows is really aggravating about illegal file names, and it also complains about overly long file names too (if you're copinyg something to a deeply nested folder, for example). I did a quick google for you and came across this -- no idea if it's good or not, but it seems to directly support batch conversion of Mac OS X files to Windows-legal file names...

http://www.publicspace.net/ABetterFinderRename/
I've had this problem a couple of times with GIGS and GIGS of info being transferred from a mac server to a PC server. Better Finder Rename saved me from hours of work. I highly recommend it.
 

yellow

Moderator emeritus
Oct 21, 2003
15,925
1
Portland, OR
IMO, it's not on Apple to deal with Windows file name limitations. Isn't this a problem with NTFS, and has nothing to do with SMB or Windows OS?

I've moved many a Mac into Active Directory now and all user data is stored on Windows servers. Imagine people who have stored up gigs and gigs (and gigs and gigs, 15GB on average) of data over the last 5 years on their local drives with no file name restrictions (other then ":" ) who now have to move their data to a Windows box? Guess who gets to rename everything? :mad:

I too have found "A Better Finder Renamer" and "FileNamer" to be incredibly helpful in all endeavors.
 

MacVault

macrumors 65816
Original poster
Jun 10, 2002
1,154
59
Planet Earth
yellow said:
IMO, it's not on Apple to deal with Windows file name limitations. Isn't this a problem with NTFS, and has nothing to do with SMB or Windows OS?...
Yea, I might agree that Apple can't be to blame for the character limitations of NTFS or whatever, BUT CAN'T APPLE MAKE OS X SMART ENOUGH TO GIVE THE USER THE OPTION TO SKIP A FILE - no matter what the reason is for the failure, be it illegal characters, corrupted file data, etc. The user should have the option to skip the file and resume the copy process with the rest of the good files. When I see the copy process totally fail do to illegal characters I think to myself... "OMG, WTF, isn't this OS X smarter than that?!?!!!!"
 

CanadaRAM

macrumors G5
Another product to look at is NameCleaner.

Looks like you need to find (or write) a script that will copy files in a given folder one at a time and automatically log failures. Check whether SuperDuper has the failure handling feature (don't know off the top of my head)
 

Nermal

Moderator
Staff member
Dec 7, 2002
18,690
1,185
New Zealand
I have to agree with MacVault here, it shouldn't abort the entire copy process when it hits an invalid filename. It's a major pain if you're copying several GB of files and then it stops after half an hour and you have to do it all again :mad: