Baruch to replace space in file name with underscore.
OK,I already did it. But I was wondering how you would do it.
Here is the problem.Some utilities s used for batch programming don't do well with spaces in file names. Unless you put quotes around everything.
For me,I would rather have underscores and forget about the nice way spaces look in file names. Just a personal quirk. So I renamed any file-name with a space to have a underscore character instead.
The method took me about an hour while working with another problem. But I only had 25 file names. It should not have taken that long. What would I doif ever do if I had 200 names with spaces?
So, my question is : How would you rename all files with space in the name to have only an underscore a dash instead?
Some sample names in a single directory::
My Dog and Cat.txt
New Phone .txt
NoSpaceHere.txt
west sunset.txt
Lost and found from back yard.txt
Anybody?