×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Illegal characters copyign files to windows

Illegal characters copyign files to windows

Illegal characters copyign files to windows

(OP)
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
http://www.experts-exchange.com/OS/Linux/Q_26764874.html
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);

RE: Illegal characters copyign files to windows

RE: Illegal characters copyign files to windows

(OP)
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);

RE: Illegal characters copyign files to windows

(OP)
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);

RE: Illegal characters copyign files to windows

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....
 

RE: Illegal characters copyign files to windows

(OP)
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);

RE: Illegal characters copyign files to windows

(OP)
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);

RE: Illegal characters copyign files to windows

(OP)
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);

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close