windows - Modify list of directories name from Command Prompt -
i have 1 requirement modify name list of directories through command prompt. operating scheme windows server 2008 r2.
example - have next directory construction
root 123#5 11 22 123#6 11 22 33 123#7 123#8 44i want update above mentioned directory construction next construction through batch file or command prompt.
root 123~5 11 22 123~6 11 22 33 123~7 123~8 44can help me on this?
try this:
@echo off setlocal enabledelayedexpansion /r "c:\root" %%d in (.) ( set dirname=%%~nxd echo !dirname! | findstr "#" >nul if !errorlevel! equ 0 ( set newname=!dirname:#=~! ren "%%~dpnd" "!newname!" ) ) endlocal
windows directory cmd
No comments:
Post a Comment