Open a folder or run a file with an action using Autohotkey

My solution for opening a folder or running a file without touching anything from inside mp3tag when i need it with the help of Autohotkey

------------------------------ EXAMPLE ------------------------------

Create a folder C:\Test


Create ( Open folder.bat ) file and enter this:

start "" "C:\Test"
del "C:\Test\Blank.txt"


Go to mp3tag:

tools - options - export

and create a new export configuration and name it    (   Blank   )

enter this:

$filename(C:\Test\Blank.txt,utf-8)

Then go to actions and create a new action group:

Temp

inside Temp create a new action type:

Export

and select the newly created export configuration   (   Blank   )

Create an ( Open folder.ahk ) file in the same folder C:\Test

and enter this:

#SingleInstance
#Persistent
SetTimer, Launch, 1000
return

Launch:
ifExist, C:\Test\Blank.txt
{
run, C:\Test\Open folder.bat
SetTimer, Launch, Off
SetTimer, Relaunch, 1000
}

Relaunch:
ifNotExist, C:\Test\Blank.txt
{
SetTimer, Launch, 1000
}

You can make it an exe and have it run automatically when windows start

The script is not mine

Now if you go to Actions and select/run the Temp action the folder will open up

Did you know that there is a function in the file list context menu "Open containing folder" ...
I honestly do not have any idea when a function like the one that you described should be more useful than the built-in function in MP3tag or the keyboard shortcut Windows-Key E to open the Windows explorer in its start folder.

Do you mean:

right click - tools - open in explorer

No,
Right-click on a file in the file list,
then for me it is the second function from the top: "Open in Explorer".

This function has been introduced in 2021:
[2021-12-07] NEW: added option to open files in Explorer via 'File > Open in Explorer' or context menu.

OK. I was using v3.11 version. I updated it and now it's there.
But obviously this is not what i want to do.

My post is just an example.

As another example i want to do this:

Select the files
run only one action to:
export a text list to a specific folder ( other than the working dir )
open that folder
run a AHK script to modify that file
and after that open the text file to view it.

You can set the target folder in the filename specification of the export script ... this could be a constant path or one with field variables or a combination of both.
If you run the export from the UI and you set the message event "Show export", then the resulting exported text file will be opened in the assigned default editing application.

Sorry for my ignorance but,
can you give me an example for:

field variables
message event "Show export"

because i don't understanding it.

What i need to change here:

$filename(C:\Test\test.txt,utf-8)
$loop(%_path%)%artist% - %title%
$loopend()

the other options are:
append data
one file per directory

Probably i am missing something.

This would be an absolute path for the filename defintion.
But you could also set one with field variables like
$filename(C:\Test%artist%\test.txt,utf-8)

In Tools>Options>Messages you find a setting "at exportings tags" which produces a message box which asks you whether you want to open the resulting export file now.

OK thanks.
But as i originally thought is a one time move and i can't see how you can run a .bat file for example, or deleting files or open multiple folders without exporting files everywhere or moving files or creating folders or executing programs etc.
Anyway i don't know if it is useful for anyone else or if they are happy the way things work but i thought i had to post it here as a dirty solution to a problem that i have in the way i work.