I am in the process of migrating a zillion files from Windows to Linux (Ubuntu) and of course the file names contain many embedded spaces.
I've been trying for days now to create a script that will properly rename these files by replacing the spaces with underscores. Using a list of fully qualified path/filenames created with find I've attempted to take each line and perform the renames. Here is an example:
rename "sites/staging.xxx.xxxxx.edu/files/2009-10 Financial Declaration Form.doc" "sites/staging.xxx.xxxxx.edu/files/2009-10_Financial_Declaration_Form.doc"
When run I see NO errors at all. Yet, the file(s) are NOT renamed. I've also tried escaping all the special characters (i.e.: "\." for dots, "\ " for spaces) with no better results.
Would someone please suggest a method that might work or something that I am doing incorrectly to resolve this roadblock?
Thanks in advance...
I've been trying for days now to create a script that will properly rename these files by replacing the spaces with underscores. Using a list of fully qualified path/filenames created with find I've attempted to take each line and perform the renames. Here is an example:
rename "sites/staging.xxx.xxxxx.edu/files/2009-10 Financial Declaration Form.doc" "sites/staging.xxx.xxxxx.edu/files/2009-10_Financial_Declaration_Form.doc"
When run I see NO errors at all. Yet, the file(s) are NOT renamed. I've also tried escaping all the special characters (i.e.: "\." for dots, "\ " for spaces) with no better results.
Would someone please suggest a method that might work or something that I am doing incorrectly to resolve this roadblock?
Thanks in advance...