cmd - Command line to change file extension of all files under a folders and its subfolders -


i looking command line can change file extension of files under folder , subfolders. there way this?

i tried ren *.js *.txt changes file extension of files under 1 folder.

i assume ms-dos mean command prompt on windows. not many people still use ms-dos.

the following run ren command on each folder within hierarchy contains .js files. bit more efficient running ren each file individually.

for /r %f in (.) @if exist "%f\*.js" ren "%f\*.js" "*.txt" 

double percents (%f becomes %%f) if run within batch script.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -