random对文件随机重命名

对文件随机重命名,这个用途可广了,大家可以想想

 

  
  
  
  
  1. @echo off  
  2. setlocal ENABLEDELAYEDEXPANSION  
  3. for /r %%a in (*.txt) do (  
  4. set c=!random!  
  5. ren %%~dpnsa.txt !c!.txt)  
  6. pause 

 

你可能感兴趣的:(职场,bat,休闲)