Replace spaces from directory name into -
I want to replace blanc spaces with - or _ in a directory name.
This name Changed:
Natica eburnea Deshayes- 1838 = Naticarius orientalis -Gmelin- 1791
into
Natica-eburnea-Deshayes--1838-=-Naticarius-orientalis--Gmelin--1791
I found this Link:
https://stackoverflow.com/questions/20791264/how-to-replace- all-spaces-by-underscores-in-all-file-names-of-a-folder
With these 2 bat files, they seem to work.
forfiles /s /m *.* /C "cmd /e:on /v:on /c set \"Phile=@file\" & if @ISDIR==FALSE ren @file !Phile: =_!"
forfiles /s /C "cmd /e:on /v:on /c set \"Phile=@file\" & if @ISDIR==TRUE ren @file !Phile: =_!"
I would rather do it in your program...
This name Changed:
Natica eburnea Deshayes- 1838 = Naticarius orientalis -Gmelin- 1791
into
Natica-eburnea-Deshayes--1838-=-Naticarius-orientalis--Gmelin--1791
I found this Link:
https://stackoverflow.com/questions/20791264/how-to-replace- all-spaces-by-underscores-in-all-file-names-of-a-folder
With these 2 bat files, they seem to work.
forfiles /s /m *.* /C "cmd /e:on /v:on /c set \"Phile=@file\" & if @ISDIR==FALSE ren @file !Phile: =_!"
forfiles /s /C "cmd /e:on /v:on /c set \"Phile=@file\" & if @ISDIR==TRUE ren @file !Phile: =_!"
I would rather do it in your program...
It should be obvious -use the Replace method!