Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Illegal characters copyign files to windows

Status
Not open for further replies.

Leozack

MIS
Oct 25, 2002
867
GB
As posted on the server 2008 forum previously :

Hi all - got a MAC 10.4 server with a whole mess of folders and files in 2 shares which have been used by both MAC 10.4 clients and windows XP PCs. They now have a server 2008 DC which all windows clients are migrated to. I'm moving the data from the MAC server shares to the new windows server shares. However I think I ran into problems when I left robocopy copying the files - I think it ignored all the files with illegal characters such as "\" - meaning some of the data never got copied from the MAC server - or copied incorrectly perhaps.Is there anyway on the MaC server or on the server2008 server to rename all files making them compatible with NTFS/SMB? I found "a better finder renamer" app online but it costs money. Doesn't anyone have a freeware tool or batch or something? :( Sigh I hate MACs! (this should really be standard MAC server functionality)

kmcferrin (MIS) 7 Feb 11 10:27
If I'm not mistaken, the Terminal on OSX is BASH, so you could conceivably write a shell script to do your dirty work for you. I have zero Unix scripting skills, but I'm sure that if yo posted in a Linux/Unix/OSX forum you could find someone who could help you.

Leozack (MIS) 14 Feb 11 5:16
Unfortunately this is the best I can find
And problematicalyl I already moved users over to the windows shares so now those are being updated - meanwhile some of the files are dead I think and others haevn't even copied over - so if I do find a way to copy them from the MAC server with a script or whatever (renaming any illegal characters where necessary) I will have to figure out how to not overwrite files that have been updated since I originally copied them all over. It's all a mess and I'd like to just run away screaming hatred of MAC, personally >_>



_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Thanks for that, that NAme Mangler thing looks powerful, and Automator may be capable of replacing illegal chars with legal ones.

I'm shocked ther isn't a tool purely for "make all filenames safe for windows" after years of having to share the same filespaces together!

If I have to use a character replacement tool, what are the characters that MACs can use that windows can't - is there a list anywhere I can go through? Or maybe quicker to just go through the list of characters illegal in windows - hmmm.

At this potin I really wish I had more experience in MAC but I have nearly none and yet I'm having to support them and this file changeover/merge. Oh well :| Wish I'd realised the illegal character issue before draft1 of copying - now I'm going to have to sync an outdated source folder to the windows version - with both newly renamed now-legal files and files that I don't want to copy cos windows version is newer. Bill please!

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Now I think of it - is there a recommended freeware sync tool I can run on the MAC (rather than windows this time) to compare to the windows versions and let me see the differences and choose to copy over the newly-fixed files or delete the windows versions or whatever? TIA :)

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
I know it has been around data processing for a long time, but what makes a "character" ILLEGAL? I think the word is suppose to be INVALID!!! Since there is nothing legal or illegal about characters!...

....JIM....
 
Funny then how your computer performs "illegal operations" more often than the government treasury ;) Now I'm onsite with this MAC server I shall try to make something suggested work

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Name Mangler needs 10.5. for 10.4 they give away File List. This lets me drag the huge fileshares in (takes 5-10m to process) then I can turn the characters windows won't allow /\?*:|">< into -. Unfortunately since I never understood regex properly and since regexp use such characters I can't use a regexp to do all the chars at once so have to go through the files doing 1 character replacement at a time. Oh well. When I'm done I'll have to try and resync the mac server to windows server and copy over and files that don't exist on windows server (hopefully just the renamed mac files). We'll see how it all goes :/

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Ok so things haevn't gone smoothly. FileList seems to work ok on one share but some chars I'm trying to replace still say there are files with them afterwards even when I run it a couple of times. Also if it comes accross renaming a file to a filename already taken it asks me if I want to but doesn't give me any shortcut to the file in question so I could manually rename one the one about to be overwritten etc so I've no idea where its located and have no choice but to just overwrite it or not.

I found a regex tester online and build thsi regex
/([\?\*:\|><\\\/])/ig,"-"
which should replace any of the non-windows chars with a -.

However I have no way to run this on the MAC that I'm familiar with (wouldn't know how to use the terminal, I'm not a UNIX guy). Currently FileList is taking 15m+ to build the list for the other share I wanted to parse. This isn't good since it rebuilds the list after every process and I have 8 chars to process ... :(

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top