WIndows Batch file to rename all files in a folder with its name

  • Thread starter Thread starter M_samiryones
  • Start date Start date
M

M_samiryones

Guest
How could i make this script for all files extension not only (XLSX)Thanks in advance ----------------------------------set MyParentDir=for %%* in (.) do set MyParentDir=%%~nx*set MyResFile=for %%* in (*.xlsx) do if not "%%*" == "%MyParentDir%.pdf" set MyResFile=%%*if not "%MyResFile%" == "" move /-y "%MyResFile%" "%MyParentDir%.xlsx"

Continue reading...
 
Back
Top