Page 1 of 1

Replace space with "_" in file names

Posted: 03 Oct 2008 07:18
by osramos
Hi there,

I need some help with this:

I have some directories with *.xls files ( Hundreds ), and i was wondering if there is something to replace the space's with "_" on every file i found, or is it's more simple remove only the space between words

Example:

EDF Segur 200807.xls
EDF Segur 200808.xls
EDFSt Bernabe 200801.xls

Output needed:

EDF_Segur_200807.xls
EDF_Segur_200808.xls
EDFSt_Bernabe_200801.xls
EDF_St_Bernabe_200801.xls

Can anyone help ?

Regards,

osramos

Posted: 06 Oct 2008 06:27
by greenfinch
I'm sure it's possible but my immediate thought was to use something like RenameMaster:
http://www.joejoesoft.com/cms/showpage.php?cid=108

It's free and very handy

Posted: 11 Jan 2009 03:00
by DGMakers
SET var=%var: =_%

that will replace " " with "_"

so just use the file rename command and use that with it =D

Posted: 18 Feb 2009 00:13
by jaffamuffin