Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

replace space with underscore command line in file name

@echo off
Setlocal enabledelayedexpansion

Set "Pattern= "
Set "Replace=_"

For %%a in (*.exe) Do (
    Set "File=%%~a"
    Ren "%%a" "!File:%Pattern%=%Replace%!"
)

Pause&Exit
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #replace #space #underscore #command #line #file
ADD COMMENT
Topic
Name
5+5 =