If you like to experiment, I make this batch as example...
- Code: Select all
@echo off
Reg Query "HKCU\Software\Classes\Directory\shell\PrefixTextFiles" >nul 2>nul && set "ACT=Uninstall" || set "ACT=Install"
echo %ACT%ing "PrefixTextFiles" Folder Context Menu
echo This to let you right click any folder, so the .txt files inside get a prefix like "FolderName - "
echo Its smart to see if correct FolderName is already in front, so instead going to next .txt file
echo.
If /i [%ACT%] == [Install] (
REG ADD "HKCU\Software\Classes\Directory\shell\PrefixTextFiles\command" /ve /d "C:\Program Files\Bulk Rename Utility\BRCUnicode64\BRC64.exe /recursive /pattern:*.txt /dir:\"%%1\" /appendfolder:\"P: - :1\" /regexp:\"^^^(.+?^)^( - ^)^(\1[ -]+^)+^(.*^):\1\2\4\" /execute" /f) > nul
If /i [%ACT%] == [Uninstall] (REG DELETE "HKCU\Software\Classes\Directory\shell\PrefixTextFiles" /f) > nul
echo %ACT%ed Context Menu (Right click folder for PrefixTextFiles), Press any key to exit
pause>nul
Save it as batch, then clicking it will make the setting for you, so then right clicking any folder presents "PrefixTextFiles".
It doesnt create another batch, but only holds the brc64 command inside the registry, but this part can be easy to change
Also, I added /regexp in case the FOR experiments created way too many files like "Folder1 - Folder1----Folder1-file.txt"
So the command first prefixes "FolderName - " then /regexp looks for more of that "FolderName" to remove them like...
Folder1 - Folder1-Folder1---Folder1--Folder1-001.txt ===> Folder1 - 001.txt
Folder1 - Folder1-Folder1 - Folder1--Folder1-002.txt ===> Folder1 - 002.txt
Folder1 - Folder1--- --Folder1--- -----Folder1-003.txt ===> Folder1 - 003.txt
It only depends on brc64.exe path being like you said... C:\Program Files\Bulk Rename Utility\BRCUnicode64\BRC64.exe
If you decide not to like the right click option anymore, then just click the batch again, and it destroys the setting.
So each time clicking it, will either invent or destroy the right click option... "PrefixTextFiles"