Get path into clipboard

Is there ANY way to get the current PATH, for a single selected file in Mp3tag, into the clipboard?

ANY = Even more convoluted then the easiest ways I have found to get the current FILENAME, for a single selected file in Mp3tag, into clipboard: by Autohotkey from the dialogs Convert-Filename-Tag or Convert-Tag-Filename. (Unfortunately, the "Extended tags" dialog (Alt-t) does NOT list these two.)

I do NOT speak of Mp3tag variables, I speak of the RESOLVED string, so that I get the STRING into the clipboard; this currently seems impossible to me. Thank you.

Do you ask for #1 or #2?

I ask for the path string, from wherever, with or without the filename part. Your (1) can just be seen on screen, so that I can amuse myself to TYPE it when I need it, and as for your (2), I don't have the slightest idea where and how that would be possible to display, let alone to copy then.

Automatically / With Mp3tag only?
The answer is: No

Manually / With external 3rd party tools?
As an idea:
You could find an external tool that can intercept the messages from Mp3tag, for example if you call the Convert Tag -> Tag and then catch the preview:

To be honest:
In the same time you have openend the Windows Explorer and copy & pasted the path from there.

1 Like

PROBLEM RESOLVED by MotleyG, in combination with LyricLover's screenshot:

Just for the fun of it, I also created the column "Fullpath" (the column "Path", with value %_folderpath% is default anyway), with value %_path%.

Before, the caption of my (sic!) dialog Alt-T was named differently (see above), then it got renamed to some "path", but without (sic!) the path part, and now (i.e. after creation of the fullpath column, incl. file name), the caption of the Alt-T dialog has LOST its previous name BUT displays the fullpath (among other things, exactly as in LyricLover's screenshot (2).

From that caption, I can now retrieve all the necessary info by Autohotkey; some Mp3tag command "File - Fullpath to clipboard" would have been so much less convoluted though since it would have avoided the necessity to open, then close the Alt-t dialog again, EVERY time you need the path info.*

But then: Who would have thought that adding %_fullpath" (which just adds the FILENAME info to the path) would change the caption of the Alt-t dialog, from its constant NAME, to fullpath?

(In order to better identify the bug in the code:
a) I got the caption displaying "path without path part" (i.e. just the file name part; before, its caption was "Extended Tags" or something like that, NO path parth then!) after half-way creating a new column "_" (since getting aware a column with value %_folderpath% was already there by default, so no need to create it a second time), then abandoning it,
b) and I got the caption displaying "path indeed" (and not only the file name part of it as in a) after creating the column %_path%.

Thus, the creation of the column with value %_path% got me the path as caption for the Alt-t dialog.

Thus, my macro opens the Alt-t-dialog, retrieves its caption, then works on the string, puts the part(s) I want into variables, closes the dialog...

This at least enables me to work onto the file system from within Mp3tag, with a LOT of CLUTTER (and unneeded time spent, since opening and closing the dialog needs "waits", and then do the file system commands from inside the macro, i.e. without having to open any file manager.

And thank you very much, LyricsLover, for your additional post, for the additional info even though for the above solution, it was not needed anymore.

*=Even simpler than a menu command: Allow for adding those columns to the Tag Panel ("File - Options - Tag Panel - Add"), where the user could then either select the panel field, then copy, or do it similar to my script in my first post, e.g.
controlgettext, s, Edit15, Mp3tag
(Edit15 being an example and s being the output variable in AutoHotkey for further processing in there)...
This would NOT only avoid awful opening and closing of the dialog, but also avoid going by the clipboard, and would thus be as speedy as it gets, in a word: professional.

Thank you very much, LyricsLover - very kind help indeed! -, and MotleyG - not optimally worded, but got me onto the right track!

The filename (instead of the path) would be no problem without the coverter-use and an editable column for %_filename% to copy.
There are ways with the tools functions of MP3Tag to deliver the content of a MP3tag-placeholder to an external program (and so skip the clipboard).

And I have to say my above "solution" does NOT work, since the caption of the Alt-t dialog is shortened within, it's NOT the full path...

Which solution do you mean?
You yourself wrote about the converter and not the extended tag-view (Alt-t).
Anyway, it is only possible to copy the filename to the clipboard from the columns, not the path.
You only could do this with a workaround, i.e. copy the path to a user defined tagfield and copy it from there.

It is possible that there may be other solutions to achieve your final goal. I think copying the path to the clipboard ist not your final goal. Normally someone wants to use the content of the clipboard in order to paste it somewhere. But as we don't know your intentions for what you want to use the content of the clipboard, we can 't give you any maybe possible hints.

I use a tool, like this:

Parameter: /c echo %_path%| clip


Thanks @ryerman

Learned something new again.
I didn't know that something like CLIP existed on the windows command line (since Windows Vista...)

Just for those interested:
The parameter /c means
Run Command and then terminate

If you would use /k , the CMD window would remain open and show the ECHOed content of %_path% in the above example. This can be useful for testing, for example to examine variables.

1 Like

I meant the solution to get the full path of a single selected file, combinable in several parts or in whole, but without getting bonkers in-between.

It seems that in theory at least, LyricsLover's solution is the ONLY ONE. Albeit that "preview" line then opens in my external text editor, is NOT visible within Mp3tag for me, so in the end, I don't know how that would really work either (except then getting the path from the external editor: way over the top...).

In Tag&Rename (30$ plus VAT, but that's certainly not the problem here), it's similar: file name available from in-line editing (possible for the file name only), and just some PART of the folder name from the main window's caption (in brackets [ and ] in there, but, as said, only a part of it).

In AudioRanger (AR), any column / cell / cell combination within any given column is copyable in-line (then multi-line in clipboard in case, so fullpath is immediately identifyable by copying 1 cell, then I put it in AHK variable. Similarly, I can copy any combination of cells from any given column into clipboard, from there into an AHK array, and I also can fill a third AHK variable, e.g. with some sub string from any cell, and a fourth one with some other sub string.

Then, I have up to 4 AHK variables: originalpath (incl. filename), newpath (ditto), originalsubstring (which may be the whole file name), newsubstring (which may be a replacement, or an addition: before, after), and then I simply run the respective folder or file rename string within AHK: done (with the necessary dialog in AHK of course, so as to not have to do "blind" renames).

Most or all "real" tag columns / cells in AR ARE editable, which facilitates the retrieval of (original or replace-/add-) sub-strings, otherwise I would have had to TYPE them into my AHK dialog fields, but as said, the rename is then done within the file system, NOT within the AR grid: In there, there will be more and more de-sync to the file system, necessarily: Thus my interest in Mp3tag, etc.

Thus, I have to adapt my AHK file system mass renaming interface to my (extended) use within AR, incl. automatic emptying of all field values not used anymore.

Similar proceeding would have been possible from within Mp3tag if it made current file AND path value available: renaming within file system by AHK, values obtained from within Mp3tag, and if you proceed from row 1 down to the last one, de-sync between grid and file system in-between becomes acceptable. Oh, and in AR, don't do intermediate control-s, since that would create additional files.

Tag tools seem to start from the assumption that meta data from the web is correct, which, for classical music, is far from being true. Thus, "bulk by schema" doesn't help much, the user needing quickly-adaptive (sic!) bulk processing instead; they have to apply their own, interactive macros if they don't want to need "days" for (complete) renames which should take less than 1 minute per CD (=group of similar files): It's not realistic to have to rewrite the schemata every time: You need to use'em with flexible rename data.

(Even multi-rename in Mp3tag would NOT be a problem since you would have your up to 3 variables, with all the other rename data, and then you would select lines 1, 4,7, 9 of your CD, and trigger the rename... but for that, file names, file name sub strings, paths, and path sub strings must be available without having to perform crazy contortions.)

Unfounded allegations IMHO.
As you still refuse do give a real example, I can only assume that you have not grasped the MP3tag functions.
You can reanme the filename up to being a fully-qualified filename which includes drive letter, path and filename.
You can rename the current folder - which is exactly that what a renaming program could do.

I also assume that you have to get rid of the idea to fiddle with parts of a path or filename - you simply set a new one.

The use of

looks to me like you have not seen the potential of MP3tag's actions.
Esp. in the case of new filenames you seem to use the "Replace" action which is possible but definitely not the best approach. The better action would be "Format value" for _FILENAME or _DIRECTORY.

I searched the forum rather thoroughly for other threads that would deal with the need to get the path of a file - and found none. So it looks to me like you have a problem where there shouldn't be one.
But again: as you do not give any real examples it is impossible to get a real solution or find that there is no solution.

My reply expands on and clarifies LyricsLover's solution above:

  1. Select any file in Mp3tag.
  2. Use Mp3tag's command File>Open in Explorer to show the selected file name
  3. Hold down the Shift key and press the right mouse button.
  4. In the context menu choose Copy as Path
  5. Paste the path wherever you want.

The Copy as Path option works even within Mp3Tag's folder selection dialogs, but of course only for folder paths. Select a folder by mouse movement (not by clicking) then hold down the Shift key and choose Copy as Path.

It's really not that complicated :slight_smile:

1 Like