JS reemplaza el espacio con un bajo
var string = "my name";
string = string.replace(/ /g,"_"); //returns my_name
If-dev
var string = "my name";
string = string.replace(/ /g,"_"); //returns my_name
for file in *; do mv "$file" `echo $file | tr ' ' '_'` ; done
find . -type f -name "* *" -exec bash -c 'mv "$0" "${0// /_}"' {} \;
for file in *; do mv "$file" $(echo $file | tr ' ' '_') ; done
@echo off
Setlocal enabledelayedexpansion
Set "Pattern= "
Set "Replace=_"
For %%a in (*.exe) Do (
Set "File=%%~a"
Ren "%%a" "!File:%Pattern%=%Replace%!"
)
Pause&Exit