Discussion Forums > Technology
Windows Scripts for Adding & Removing Spaces in Filenames?
Baby Naruto:
Does anyone know where I can download scripts for "Windows XP" that can add and remove spaces in filenames?
Note: I do not want scripts that replaces spaces with underscores, periods etc, I just want scripts that can add spaces to file names, and also remove them.
Freedom Kira:
You're gonna have to be more specific. I would assume that you want one that replaces spaces with underscores or vice versa. Your note kinda throws that out the window without really specifying exactly what it is that you're looking for.
In case you're looking for a script that pads spaces on the end of a filename, you can't do that. AFAIK filenames are trimmed of those spaces automatically.
Baby Naruto:
--- Quote from: Freedom Kira on May 15, 2011, 04:21:31 AM ---You're gonna have to be more specific. I would assume that you want one that replaces spaces with underscores or vice versa. Your note kinda throws that out the window without really specifying exactly what it is that you're looking for.
In case you're looking for a script that pads spaces on the end of a filename, you can't do that. AFAIK filenames are trimmed of those spaces automatically.
--- End quote ---
To put it simply......
I want Naruto Rocks.jpg to become NarutoRocks.jpg, without me having to manually remove the space between Naruto and Rocks, etc.
billlanam:
--- Quote from: Baby Naruto on May 15, 2011, 04:47:14 AM ---
--- Quote from: Freedom Kira on May 15, 2011, 04:21:31 AM ---You're gonna have to be more specific. I would assume that you want one that replaces spaces with underscores or vice versa. Your note kinda throws that out the window without really specifying exactly what it is that you're looking for.
In case you're looking for a script that pads spaces on the end of a filename, you can't do that. AFAIK filenames are trimmed of those spaces automatically.
--- End quote ---
To put it simply......
I want Naruto Rocks.jpg to become NarutoRocks.jpg, without me having to manually remove the space between Naruto and Rocks, etc.
--- End quote ---
Removing spaces is easy, adding will only work if you have a consistent way to determine where they go, which is very unlikely, easier to make a hard link of the file name without spaces in another folder, then you still have the original names.
ph4zr:
Does the script have to run without any additional installations? It would be trivial in perl, although like the others said, you would need to have a consistent way to determine where to add spaces back in. Something like "after before every capital letter" would work fairly well.
Until you hit abbreviations.
Of course, there's still the issue of name clashes: since a rename is essentially a move, some files might "magically" disappear on you if you rename "A B C" to "ABC" when "ABC" already exists. <<Had similar happen.
Is there a specific reason you don't want underscore replacement? It's fully reversible, and the names wouldn't be escaped in URLs/etc. because of it. Obviously if it's personal preference there's nothing for it, but I was wondering if maybe the concern was something that could be alternately addressed.
Navigation
[0] Message Index
[#] Next page
Go to full version