DJW said:
Is there a windows XP application to find file or folder names
that have characters not allowed and either delete those characters
or replace them? I have about a thousand files with question marks
in the file name on my hard drive that were moved over from a Mac.
When I try to sync my files with SyncBack from one hard drive to
another within my windows network. I get an error that those files
with the question mark can not be copied. Why and how can I even have
them existing on my windows formatted hard drives containing question
marks in the file names? I have both NTFS and FAT file systems on
different internal and external hard drives that I am trying to copy
to and fro from.
Based on this article, it sounds like you need a software path
that is aware it is dealing with "Macintosh stuff". Maybe
back in this era, a person would move Mac files to the
"File Server for Macintosh" and the translations would be
fixed up. Maybe SyncBack doesn't have that path, or is not
aware of the strangeness of the thing it is syncing.
"Macintosh File Name Translation"
http://technet.microsoft.com/en-us/library/cc976909.aspx
*******
This isn't exactly the same topic, but I did find a way to
gain access to my Macintosh files just yesterday.
I was playing around with a PowerPC version of Ubuntu, and
it runs on my PowerPC Macintosh. (I can boot the Macintosh
with a PowerPC version of Ubuntu Linux.) What I noticed, is
Ubuntu can mount all the HFSplus partitions, when I boot the
LiveCD. That gives me Linux access to the Mac files. Ubuntu
can handle disks from both Windows and from Macintosh.
So just for fun, I did this:
1) Image 80GB file using Ubuntu dd. That means,
copy every sector from the Macintosh hard drive, and
make an 80GB flat image file from it.
2) Use VHDTool (free download from msdn) to
convert mac.dd to mac.vhd. The conversion is
done in place, and you change the file extension
after it's finished. Takes only a couple seconds.
This is a way of taking an image of a hard drive,
inside a virtual machine environment (as otherwise,
Windows would not know how to mount such an image).
http://archive.msdn.microsoft.com/vhdtool
VhdTool.exe /convert mac.dd
3) Mount mac.vhd as a virtual drive in Virtual PC 2007.
Run the x86 Ubuntu LiveCD in Virtual PC 2007.
If I need to extract a file, I can move it via
file sharing, to the main OS on the computer (WinXP).
So I now have a complete image of my Macintosh,
accessible from Virtual PC. The VHD format, doesn't
care about file systems, so the fact that the file
system is not FAT32 or NTFS, doesn't bother VHDTool
at all. In fact, it takes very few writes to disk,
to convert an 80GB disk sector image, into an
80GB fixed-capacity VHD virtual disk image. Just
a few KB of header and trailer info needed.
The hardest part, was getting the 80GB flat file,
over to my PC. I did that via FTP
Open an
FTP session, and issue a command like this once
the connection is open. Works in Ubuntu at least,
transferring to a Windows FTP server. This copies
my entire Macintosh disk, over FTP, at around
40MB/sec. The block size should be adjusted,
according to the total size of the disk (omit,
if you don't know how to work details like that out).
The 8192 was as big a value as I wanted to try
for this run. This command is in "pipe"
format, and that's what the "|" bar symbol
is for.
binary
put "|dd if=/dev/sda bs=8192" mac.dd
That's not to say the conversion process is easy
taking that route. Just that, I can use tools
such as HPcopy in Linux potentially, to copy
both resource and data fork to another OS.
For a lot of purposes, you don't need the resource
fork when moving a file to another platform. But
if the file appears "damaged", that could be the
missing bit of it, the resource fork. The NTFS
equivalent of a resource fork, is "alternate streams",
and you could potentially store a Macintosh file having
both forks, as two streams in NTFS. There is no
mechanism in FAT32 to do that.
http://manpages.ubuntu.com/manpages/lucid/man1/hpcopy.1.html
This doesn't address your file name issue directly.
It's to show, if you really needed to get info off
a stinky old Mac, there are other ways to do it
Initially (some months ago), I tried to do this by
setting up a Macintosh emulator, but that project
was a dismal flop.
*******
Another way I used to get screwed when moving files from
Mac <--> PC, was the 31 character file name limit on Mac.
Occasionally, a file with a too-long name, would get
truncated, and would then end up with the same name
as another too-long filename, and one file would overwrite
the other during a transfer. So there are more ways
than you'd think, to have the transfer screw up. It's
not just ??? you have to worry about.
(More file naming comedy...)
http://itec.blogs.bucknell.edu/2011/03/17/illegal-characters-for-file-names/
*******
This tool claims to offer rename capability for illegally
named things, but the site (jrtwine.com) no longer offers the product.
The free version, unfortunately, doesn't support the rename function.
The version for $25.99 does. But it is not listed on their
current web site. I located an archived copy.
http://web.archive.org/web/20080213032924/http://www.jrtwine.com/Products/DelFXPFiles/
I would think, you could write a small Perl program to work
out issues like this. Perl is available for Windows, and
it does have a file rename function inside. The interesting
part, is how it handles say Unicode in file names. Maybe a
short Perl script could do the job. I did manage, using
Perl, to fix a "too long file name" problem that Explorer
refused to let me do, so it does have its benefits
as an environment.
If you were writing the Perl program, the logic would be
something like this.
blah.pl <directory_name of mixed good and bad files>
For each filename in directory
display the filename discovered
convert unicode to hex or whatever, to make anything
invisible or unrepresentable, to something you can see
"Do you want to rename ?"
If yes, accept new file name.
Rename file
until done or exit
Perl is a kind of scripting language.
If you cannot find a payware program to do what you want,
you can try your hand with this. You still have to write
the code, but the program shouldn't be more than a page long.
http://www.activestate.com/activeperl/downloads
I'm not a Perl expert, but I did manage to learn enough
Perl to rename the file that had a too-long name.
HTH,
Paul