Change spaces with underscore in filename via cmd

Change spaces with underscore in filename via cmd

For all files in current directory

for i in *;do mv "$i" "${i// /_}";done