Register FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Thu May 23, 2013 19:00



Post new topic Reply to topic  [ 3 posts ] 
"space" in mac filename 
Author Message

Joined: Sun Jul 03, 2011 14:50
Posts: 2
Post "space" in mac filename
Is there a utility that will scan 500 GB worth of tiles and insert a "_" character where a "blank space" exists so that the entire drive can be copied to a new NTFS r/w drive?


Sun Jul 03, 2011 15:41
Profile
Tuxera Developer

Joined: Sat Oct 06, 2007 09:24
Posts: 530
Post Re: "space" in mac filename
Hi,

NTFS supports blank spaces in filenames, so why would you want to do that?

Regards,

- Erik

P.S. If you really want to do this, you could try:
Code:
find . -exec sh -c 'CONV="`echo "$0" | sed "s/ /_/g"`"; if [ "$0" != "${CONV}" ]; then mv -v -n "$0" "${CONV}"; fi' '{}' \;

This will go through all the contents recursively starting in the current directory and rename each file or directory with spaces to a pathname with spaces converted to underscores.
However it is not perfect as when directories are renamed, 'find' gets confused... so you have to run the command repeatedly until it doesn't find anything more to rename.


Wed Jul 06, 2011 08:15
Profile

Joined: Sun Jul 03, 2011 14:50
Posts: 2
Post Re: "space" in mac filename
Erik: Thanks for the code. I will be much happier not having to use it, but I had not been aware that NTFS would deal with "blanks" in the file name.
Cheers, David


Thu Jul 07, 2011 16:50
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.