Skip to content

Instantly share code, notes, and snippets.

Add batch file to the context menu - Process all files in folder

Add batch file to the context menu - Process all files in folder

This gist allows you to add a batch script to the Windows context menu (right click menu). This batch file is just a dummy-file. It doesn't do anything other than list all the files in a folder, so don't get nervous 😉.

  • Add the batch file to C:\Scripts\
  • Run Add Process all files in folder to the context menu.reg
  • Right click on a folder to see the new option "Process all files in folder"
  • Run the script to process all files in folder
  • To remove the script just delete the batch file and run "Remove Process all files in folder from the context menu.reg"
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\Process all files in folder]
@="&Process all files in folder"
[HKEY_CLASSES_ROOT\Directory\shell\Process all files in folder\command]
@="\"C:\\Scripts\\Process all files in folder.bat\" \"%1\""
@echo off
cd %1
for /r %%i in (*) do (echo "%%i")
pause
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\shell\Process all files in folder]
@="&Process all files in folder"
[-HKEY_CLASSES_ROOT\Directory\shell\Process all files in folder\command]
@="\"C:\\Scripts\\Process all files in folder.bat\" \"%1\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment