Commands on Buttons %currentfolder%
Posted: 11 Jun 2024 12:15
Hello, i wrote a batch file to rename all the files in a folder to my specifications that I have built using Advanced Renamer and I have been trying to find a way to turn that .bat file into just a button on the toolbar I can press and it executes either the batch file saved to a certain location or better off just a way to run cmd commands on a selected folder. For doing git pull on alot of folders I use for ai as well as for the renaming process which is :
I have been having to keep that batch file in multiple locations on my machine so I can execute that action on all files in a folder but would really like to not have to tot that bath file everywhere as well as having to first CNTRL+ALt+O or P to have it open a prompt on selected folder and then type git pull and sometimes its for like 17+ folders at a time. Appreciate any help someone can give to reach this goal thanks!
Code: Select all
@echo off
setlocal
:: Set the method file path
set "method_file=D:\BK-UPz\AdvRenamer BathMethods\correctnames.aren"
:: Check if the method file exists
if not exist "%method_file%" (
echo Method file not found: %method_file%
pause
endlocal
exit /b 1
)
:: Set the current directory
set "current_dir=%cd%"
:: Check if arenc.exe exists
set "arenc_path=C:\Program Files\Advanced Renamer\arenc.exe"
if not exist "%arenc_path%" (
echo ARen executable not found: %arenc_path%
pause
endlocal
exit /b 1
)
:: Run Advanced Renamer using arenc.exe
"%arenc_path%" -e "%method_file%" -p "%current_dir%"
endlocal