IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Command-line load of multiple directories, V2.44
chrisjj
post Sep 24 2010, 15:31
Post #1


Member


Group: Full Members
Posts: 1381
Joined: 25-October 05
Member No.: 2273
Mp3tag Version: -



How may I achive this please? With multiple /fp switches, only the last takes effect.

Thanks.
Go to the top of the page
 
+Quote Post
DetlevD
post Sep 24 2010, 18:15
Post #2


Member


Group: Full Members
Posts: 4787
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.61d



This works for me. Example, loading three folders (this is one commandline string):

"C:\Programme\Mp3tag\Mp3tag.exe" /fp "M:\MUSIK\ROCK\A" & "C:\Programme\Mp3tag\Mp3tag.exe" /fp "M:\MUSIK\ROCK\B" & "C:\Programme\Mp3tag\Mp3tag.exe" /fp "M:\MUSIK\SOUNDTRACK"

Note.
Mp3tag ends up with the current working folder as the last imported folderpath.
Regarding last example from above %_workingpath% will contain "M:\MUSIK\SOUNDTRACK".
It would be nice to have an additionally Mp3tag commandline option, which can set the current working folder to any user defined folderpath, independently from folders loaded by option "/fp".


It is also possible to create a textfile which contains the list of the folders to load and invoke a FOR command to load the folders from that list file.

FolderList.txt
M:\MUSIK\ROCK\A
M:\MUSIK\POP COLLECTION
M:\MUSIK\SOUNDTRACK

FOR /F "tokens=*" %A in (FolderList.txt) DO "C:\Programme\Mp3tag\Mp3tag.exe" /fp "%A"

DD.20100924.2046.CEST
Edit.
Commandline example changed.
Added FOR example.
DD.20100927.1752.CEST

This post has been edited by DetlevD: Sep 27 2010, 16:55


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
chrisjj
post Sep 25 2010, 22:11
Post #3


Member


Group: Full Members
Posts: 1381
Joined: 25-October 05
Member No.: 2273
Mp3tag Version: -



QUOTE (DetlevD @ Sep 24 2010, 18:15) *
This works for me. Example, loading three folders (this is one commandline string):
Thanks D.

QUOTE (DetlevD @ Sep 24 2010, 18:15) *
I think it is more safe to use the folderpath without the trailing backslash when invoking Mp3tag.exe from the commandline.
Safe from... what?

QUOTE (DetlevD @ Sep 24 2010, 18:15) *
It would be nice to have an additionally Mp3tag commandline option, which can set the current working folder
Agreed!
Go to the top of the page
 
+Quote Post
chrisjj
post Oct 5 2010, 17:44
Post #4


Member


Group: Full Members
Posts: 1381
Joined: 25-October 05
Member No.: 2273
Mp3tag Version: -



Detlev, I fear this technique is unreliable. I just saw

QUOTE
start "Mp3tag Dance" "%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fp:"R:\Dance\"&"%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fp:"R:\Curtains\"&"%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fp:"R:\Spacers\"&"%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fp:"R:\Utility\"


launch Mp3tag and load JUST the first directory. I have a horrible feeling the behaviour is timing sensitive.

I asked here before: what determines whether Mp3tag combines such commands into a multi-load and do not recall any answer. Anyone know?
Go to the top of the page
 
+Quote Post
DetlevD
post Oct 5 2010, 22:11
Post #5


Member


Group: Full Members
Posts: 4787
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.61d



QUOTE (chrisjj @ Oct 5 2010, 18:44) *
... Mp3tag and load JUST the first directory. I have a horrible feeling the behaviour is timing sensitive.
I asked here before: what determines whether Mp3tag combines such commands into a multi-load and do not recall any answer. Anyone know?

This sounds not so good, and I do not know for sure what is going in in detail, but there might be more than one complication working together.

I think that a commandline driven Mp3tag.exe only can load (add) multiple folders by multiple invoking the Mp3tag.exe with parameter /fp when all this work is going on in the same process environment (shell) and Mp3tag.exe can detect for itself if there is already a running instance of Mp3tag.exe around in the process list. So Mp3tag.exe uses new incoming /fp parameter values to add folders, but immediately kills newly spawned Mp3tag.exe processes.

Did you try the FOR loop proposal from post above?

I do not understand why you start a new cmd process by invoking start "Mp3tag Dance".
You will not see the new title at a new command window because Mp3tag is a window application.

I have tried such command lines ...
1. This works for me:
CODE
start "Mp3tag Dance" "Mp3tag.exe" /fp:"X:\AnyFolder1\"&"Mp3tag.exe" /fp:"X:\AnyFolder2\"&"Mp3tag.exe" /fp:"X:\AnyFolder3\"&"Mp3tag.exe" /fp:"X:\AnyFolder4\"


2. This works not for me:
CODE
start "Mp3tag Dance" "Mp3tag.exe" /fp:"X:\AnyFolder1\" & "Mp3tag.exe" /fp:"X:\AnyFolder2\" & "Mp3tag.exe" /fp:"X:\AnyFolder3\" & "Mp3tag.exe" /fp:"X:\AnyFolder4\"

Mp3tag throws error windows of cannot access this or that folder.

3. This works for me:
CODE
start "Mp3tag Dance" "Mp3tag.exe" /fp:"X:\AnyFolder1" & "Mp3tag.exe" /fp:"X:\AnyFolder2" & "Mp3tag.exe" /fp:"X:\AnyFolder3" & "Mp3tag.exe" /fp:"X:\AnyFolder4"


As I said it above ... there seems to be a quirk when the commandline is evaluated by Mp3tag.
See the spaces on the commandline and see the trailing backslashes at the folder names.

DD.20101005.2310.CEST


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
chrisjj
post Oct 5 2010, 23:13
Post #6


Member


Group: Full Members
Posts: 1381
Joined: 25-October 05
Member No.: 2273
Mp3tag Version: -



> I think that a commandline driven Mp3tag.exe only can load (add) multiple folders by multiple
> invoking the Mp3tag.exe with parameter /fp when all this work is going on in the same process
> environment (shell) and Mp3tag.exe can detect for itself if there is already a running instance of
> Mp3tag.exe around in the process list.

Florian??

> Did you try the FOR loop proposal from post above?

Yes, with path adjustment and in batch file:

CODE
echo > FolderList.txt
echo R:\Curtains >> FolderList.txt
echo R:\Dance  >> FolderList.txt
echo R:\Spacers >> FolderList.txt
echo R:\Utility >> FolderList.txt

FOR /F "tokens=*" %%A in (FolderList.txt) DO "%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fp "%%A"
Success 5 of 5 times. Likewise with the folder order reversed.

But as I said, my test case is unstable.

> I do not understand why you start a new cmd process by invoking start "Mp3tag Dance".

A remnant, indeed now redundant.

> 1. This works for me:
>2. This works not for me:

differing only in spaces - ouch!

> 3. This works for me:

OK, recoding:

CODE
REM recoded with no trailing path slash
start "" "%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fp:"R:\Dance"&"%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fp:"R:\Curtains"&"%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fp:"R:\Spacers"&"%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fp:"R:\Utility"


Result: Run 1 of 1 - FAILED to load Spacers and Utility

Then:

CODE
REM recoded sorting folders in increasing size
start "" "%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fp:"R:\Spacers"&"%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fp:"R:\Utility"&"%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fp:"R:\Dance"&"%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fp:"R:\Curtains"


Result: REM Run 1 of 1 - SUCCESS

I'll go with your unfailed-so-far FOR solution for now. But I am rather uncomfortable.

Thanks D.

This post has been edited by chrisjj: Oct 5 2010, 23:15
Go to the top of the page
 
+Quote Post
DetlevD
post Oct 6 2010, 00:06
Post #7


Member


Group: Full Members
Posts: 4787
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.61d



QUOTE (chrisjj @ Oct 6 2010, 00:13) *
... I'll go with your unfailed-so-far FOR solution for now. But I am rather uncomfortable. Thanks D.

If you do not have the need for an external text file, then try the attached "drag and drop" cmd script.
Attached File  Mp3tag_Folder_Launcher.cmd.txt ( 836bytes ) Number of downloads: 154

(for usage remove ".txt" extension)

DD.20101006.0203.CEST

This post has been edited by DetlevD: Oct 6 2010, 01:04


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
dano
post Oct 6 2010, 00:13
Post #8


Moderator


Group: Moderators
Posts: 5679
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.61d



If you can make a FolderList.txt file then just make it a FolderList.m3u and load that.


--------------------
Go to the top of the page
 
+Quote Post
chrisjj
post Oct 6 2010, 00:48
Post #9


Member


Group: Full Members
Posts: 1381
Joined: 25-October 05
Member No.: 2273
Mp3tag Version: -



Thanks D for that script.

QUOTE (dano @ Oct 6 2010, 00:13) *
If you can make a FolderList.txt file then just make it a FolderList.m3u
Of illegal format, I note. I feel unhappy relying on yet another undefined behaviour, especially one not supported by reliance from Mp3tag itself. Though this one does have the advantage of setting the CWD uniformly. Thanks Dano.

Perhaps Florian would care to make this behaviour offically defined?? (For Mp3tag - not .M3U generally of course.)

Meanwhile I think I'll take this inefficient but safest solution:

CODE
cd R:\
R:
echo rem > FolderList.m3u

FOR /R R:\Spacers %%G IN (*.*) DO echo %%G >> FolderList.m3u
FOR /R R:\Utility %%G IN (*.*) DO echo %%G >> FolderList.m3u
rem FOR /R R:\Dance   %%G IN (*.*) DO echo %%G >> FolderList.m3u
rem FOR /R R:\Curtains %%G IN (*.*) DO echo %%G >> FolderList.m3u

"%PROGRAMFILES%\Mp3tag\Mp3tag.exe" /fn FolderList.m3u


The Mp3tag CWD is the DOS CWD.

Go to the top of the page
 
+Quote Post
DetlevD
post Oct 6 2010, 02:48
Post #10


Member


Group: Full Members
Posts: 4787
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.61d



QUOTE (chrisjj @ Oct 6 2010, 01:48) *
...The Mp3tag CWD is the DOS CWD.

This sounds good and it seems that you have found a way to handle your needs.

In the meantime I have created two command scripts, which might be useful too.
Please have a look into.

To create a text listfile of filepathes and/or folderpathes per "Drag and Drop" you can use the attached command file "Make Listfile of Files and Folders.cmd". Simply "Drag and Drop" selected files and/or folders onto the icon of the command script.
Attached File  Make_Listfile_of_Files_and_Folders.cmd.txt ( 1.46K ) Number of downloads: 135


To launch Mp3tag using the previously created listfile you can use the attached command file "Mp3tag Listfile Launcher.cmd". Simply "Drag and Drop" the listfile onto the icon of the command script and Mp3tag will start and load all entries.
Attached File  Mp3tag_Listfile_Launcher.cmd.txt ( 1.11K ) Number of downloads: 119


DD.20101006.0340.CEST


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
dano
post Oct 6 2010, 12:39
Post #11


Moderator


Group: Moderators
Posts: 5679
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.61d



QUOTE
I feel unhappy relying on yet another undefined behaviour, especially one not supported by reliance from Mp3tag itself.

The Mp3tag shell extension also relies on this functionality, no need to feel unhappy.


--------------------
Go to the top of the page
 
+Quote Post
chrisjj
post Oct 6 2010, 13:06
Post #12


Member


Group: Full Members
Posts: 1381
Joined: 25-October 05
Member No.: 2273
Mp3tag Version: -



QUOTE (dano @ Oct 6 2010, 12:39) *
The Mp3tag shell extension also relies on this functionality, no need to feel unhappy.
Thanks Dano, but re changing that FolderList.txt to FolderList.m3u, I don't see reliance on the functionality of folderpath in M3U, so please clarify what you mean by "this functionality".

This post has been edited by chrisjj: Oct 6 2010, 13:10
Go to the top of the page
 
+Quote Post
dano
post Oct 6 2010, 13:22
Post #13


Moderator


Group: Moderators
Posts: 5679
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.61d



The shell extension creates a temp m3u8 file and loads it (with folder paths in if necessary).


--------------------
Go to the top of the page
 
+Quote Post
chrisjj
post Oct 6 2010, 13:59
Post #14


Member


Group: Full Members
Posts: 1381
Joined: 25-October 05
Member No.: 2273
Mp3tag Version: -



QUOTE (dano @ Oct 6 2010, 13:22) *
The shell extension creates a temp m3u8 file and loads it (with folder paths in if necessary).
Ah, I now see this is new in the latest version, which due to filter incompatibilty I have not yet adopted. Thanks.
Go to the top of the page
 
+Quote Post
LyricsLover
post Oct 6 2010, 17:57
Post #15


Member


Group: Full Members
Posts: 789
Joined: 21-September 06
From: Central Europe
Member No.: 3709
Mp3tag Version: 2.61d



Gread idea, DetlevD!

Just a little addition: If you have installed your Mp3tag.exe in
C:\Programme (x86)\...... on a 64bit-Windows 7, then you could use the environment value %ProgramFiles(x86)% instead of %ProgramFiles% in the commandline-script to point to the right place for Mp3tag.exe

Mp3tag.exe is still a 32bit application, right? wink.gif
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd July 2014 - 04:42