Posted By

ironcrema on 07/07/18


Versions (?)

Rename to lower multiple filenames in windows

 / Published in: Other

Rename to lower multiple filenames in windows

  1. Go to the directory and run the following command:
  3. for /f "Tokens=*" %f in ('dir /l/b/a-d') do (rename "%f" "%f")
  5. Here is the break-down in case someone wants to modify/improve :
  7. for /f - For every line
  8. "Tokens=*" - Process each item in every line.
  9. %f in (...) - %f is your variable name for every item.
  10. dir - lists every file and subdirectory in a directory.
  11. /l - (parameter for dir) Uses lowercase.
  12. /b - (parameter for dir) Uses bare format, only the file/directory names, no size, no headers.
  13. /a-d - (parameter for dir) Do not list directories. (a stands for attribute, - stands for not and d stands for directory).
  14. rename "%f" "%f"- rename the file with its own name, which is actually lowercased by the dir command and /l combination.

Report this snippet  

You need to login to post a comment.