As our sole Mac Administrator, it is my duty to have to help a number
of Mac users migrate their files from Mac OS 9 to a Windows
Server. Some of these files reside on a FireWire drive.
Since Windows and Mac OS X don't support all the same characters
in filenames, I've had to rename some of the files to take out
characters the Windows Server doesn't like, such as "*" or
"/". (Before you Mac users get all superior and start
spitting on Windows filenames, try putting a ":" in one of
your Mac filenames. You can't.)
Doing this by hand is not
really feasible. There are 100GB worth of files on the FireWire
drive, many of which contain characters Windows doesn't
support.
Enter Automator, the tool included in OS X.
I created a "workflow" that knew to remove all invalid
characters from a filename for me. It worked fine in my initial
tests. I fed it the entire FireWire drive and waited. Soon
it told me that it was done. I tried copying the files over, and
was immediately shocked to see that the copy was halted with an error
due to a filename that didn't convert using Automator. This
filename was just one level below the files and folders I fed the
Automator. Apparently it wasn't smart enough to realize that
when it's given a folder that it should crawl through the contents
of that folder, and its subfolders as well.
I tried using
Spotlight to find all the files that contained characters that are
invalid on Windows. No dice. Spotlight doesn't find
ANYTHING on the drive if I ask it to look for files with "*"
or "/" in the name. Why? I have no idea.
It's a valid search. The search works on network drives
I've mounted and on internal IDE drives, but it doesn't work on
the external FireWire drive. The external drive was partitioned
and formatted by OS X 10.4, and Disk Utility gives it a clean bill of
health. So why can't Spotlight search it? Beats the heck
out of me.
What I've now been reduced to is going a
sub-folder and sub-subfolder at a time to copy stuff over and wait for
an error to pop up. When it does, I feed the contents of that folder to
Automator and let it fix them, then try copying the files again.
If I get another error, I go a level deeper. What a pain!
The only alternative I have is to copy a folder to the local hard
drive, run the search, fix the filenames, then copy it on to the server
across the network. This extra copying adds time to the process
but seems the only workaround here.
OS X hasn't been any real
help here, either. Several times it's complained about being
unable to copy a folder because, for instance, the file
"OpenFolderListDF" can't be copied. You also
can't find that file/folder using Spotlight or Find, even if you ask
for invisible files. So you're stuck with a folder you
can't copy as-is because it contains an invisible file you can't
find in order to remove. I could probably locate it from a UNIX
command line, but the person who organized all these files has as many
as 5 levels of subdirectories in a directory tree and I really don't
feel like digging through all that to locate a file that Apple ought to
have ignored or made visible so it could be deleted.
Even the
command-line "find" command couldn't locate that
"OpenFolderListDF" file, but it stops the Finder dead in its
tracks. I also couldn't use the "Find" command to
find "all" of the invisible files on the FireWire drive.
Attempts to do that came back with no files found, though there were
clearly invisible files on the drive.
I also tried to use
Automator to copy the files from the FireWire drive to the server.
That failed for much the same reason the renaming did. Automator
has a bad habit of ignoring errors during file copying and moving on to
the next folder/file. As a result, of the 44GB of files I asked it
to copy (many of which had the filename problems mentioned above)
Automator copied only about 11GB. But, it didn't display any
errors or give any indication that there was any kind of an issue with
the process. Just a green "complete" message. Had
I "believed" Automator and wiped that FireWire drive clean,
thinking it had copied the files to the server, I'd have lost
two-thirds of the user's data. I'd look like the bad guy,
all because I expected Automator to behave in a logical, sensible
manner.