Renaming certain files with Windows batch -


using batch file there way can strip off .failed extension first 1000 files files in directory.

for example

1.pdf.failed => 1.pdf 2.pdf.failed => 2.pdf

this should work

for %%f in (*.pdf.failed) rename "%%f" "%%~nf" 

if want xx first files, define variable count , increment on each loop itineration. when number reached, break loop. see how break loop here : how break inner loop in nested loop batch script


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -