Guest NewsBot Posted May 20, 2012 Posted May 20, 2012 >>> not sure if I submitted to the correct forum <<< ? in a specific directory "C:UsersEPI-QCDesktopDailyQC©STSNRT_QC" There are many files with this format example: SWB12-1852P1-028-Client_EOL_Report.sts all the char between the "-" are variable values, all other char are fixed values I want to rename all the files to the following format example: 028-SWB12-1852P1-Client_EOL_Report.sts I created the following script but something is wrong with it for /F "tokens=1-4 delims=-" %%G in (' dir /C:UsersEPI-QCDesktopDailyQC©STSNRT_QC .sts') do rename "%%G^&%%H^&%%I^&%%J" "%%I^&%%G^&%%H^&%%J" I think that maybe I specified an illegal delimiter "-" (?) maybe my syntax for dir is incorrect (?) something else (?) Please can you help me Thank you Ron1Cebu View the thread Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.