Noob help with script

Discuss and share scripts and script files...
Post Reply
WastedMoney
Posts: 8
Joined: 18 Jun 2017 08:30

Noob help with script

Post by WastedMoney »

G'day all,

I've read as much of the help files as my seniors brain will absorb and have not been able to have the following work correctly in my 'simple' script.

Code: Select all

 ::#250;
 openwith "D:\01. Applications\Mp3tag\Mp3tag.exe";
The commands work up to a degree. All files in current directory are selected, however when Mp3Tag 'fires' it wants to open all files the main directory:
  • C:\Music\
  • (subdirectories)
    ACDC
    Black Sabbath
    etc, etc
What I'm trying to achieve is when I have opened the ACDC folder, select all files (which does happen) and then have those files be opened by Mp3Tag, not the whole Music directory.

If this is as clear as :cup: please ask and I'll try to explain further.

Cheers and thanks much for the help in advance.

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: Noob help with script

Post by highend »

Code: Select all

run lax("D:\01. Applications\Mp3tag\Mp3tag.exe" <allitems>);
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

WastedMoney
Posts: 8
Joined: 18 Jun 2017 08:30

Re: Noob help with script

Post by WastedMoney »

Thank you very much for the extremely quick reply and solution. It works perferctly!

My question is, if possible, could you explain the difference between your code

Code: Select all

run lax("D:\01. Applications\Mp3tag\Mp3tag.exe" <allitems>);
and the 'mess' I wrote

Code: Select all

openwith "D:\01. Applications\Mp3tag\Mp3tag.exe";
Again, thanks very much greatly appreciate the help and advice.

Cheers

PS: :beer: und :cup: coins sent.

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: Noob help with script

Post by highend »

It's not necessarily a mess what you've wrote (although the selection id command isn't necessary).
In general script commands can open things without doing a real selection first (but this depends on the command ofc) so I'd advice to go that route.

When I'm inside a folder with e.g. 5 mp3 files this would have worked as well:
openwith "D:\01. Applications\Mp3tag\Mp3tag.exe";
even if there isn't any selection at all

Please show a full screenshot of your XY instance when your original command opens "everything" instead of only the contents of the current folder.

And: Thanks for the coins^^ :tup:
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

WastedMoney
Posts: 8
Joined: 18 Jun 2017 08:30

Re: Noob help with script

Post by WastedMoney »

Hmmm, doesn't seem to want to work with a large number of files. Tried it in one directory that has over 1000 mp3 files and got this error (code shortened, but in total there are 1492 files.

Code: Select all

The filename or extension is too long.

File: "D:\01. Applications\Mp3tag\Mp3tag.exe"

Parameters: "C:\02. Music\80's\Zoom.mp3" "C:\02. Music\80's\You've Lost That Lovin Feeling.mp3" "C:\02. Music\80's\You're The Voice.mp3" "C:\02. Music\80's\You're The Inspiration.mp3" "C:\02. Music\80's\You're The Best Thing.mp3" "C:\02. Music\80's\You're So Strong.mp3" "C:\02. Music\80's\You're Only Human.mp3" "C:\02. Music\80's\You're A Friend Of Mine.mp3" "C:\02. Music\80's\Your Wildest Dream.mp3" "C:\02. Music\80's\Your Love.mp3" "C:\02. Music\80's\Your Love Still Brings Me To My Knees.mp3" "C:\02. Music\80's\Your Love Is Driving Me Crazy.mp3" "C:\02. Music\80's\Young Turks.mp3" "C:\02. Music\80's\Young Guns.mp3" "C:\02. Music\80's\You'll Never Know.mp3" "C:\02. Music\80's\You'll Always Find Me In https://www.xyplorer.com Parties.mp3" "C:\02. Music\80's\You Win Again.mp3" "C:\02. Music\80's\You Weren't In Love With Me.mp3" "C:\02. Music\80's\You Spin Me Round.mp3" "C:\02. Music\80's\You Should Hear How She Talks About You.mp3" "C:\02. Music\80's\You Shook Me All Night Long.mp3" "C:\02. Music\80's\You Might Think.mp3" "C:\02. Music\80's\You May Be Right.mp3" "C:\02. Music\80's\You Make My Dreams.mp3" "C:\02. Music\80's\You Little Thief.mp3" "C:\02. Music\80's\You Keep Me Hanging On.mp3" "C:\02. Music\80's\You I Know.mp3" "C:\02. Music\80's\You Got Nothing I Want.mp3" "C:\02. Music\80's\You Got Lucky.mp3" 
Used it on a directory that only had 379 and worked perfectly. Is there a number of files that this won't work with?

Cheers

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: Noob help with script

Post by highend »

It's not about the number of files but the total length of the command line argument you're passing to Mp3Tag.

The solution is easy, call it with just the folder :P

Code: Select all

    run lax("D:\01. Applications\Mp3tag\Mp3tag.exe" "<curpath>");
// or
    openwith "D:\01. Applications\Mp3tag\Mp3tag.exe", , "<curpath>";
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

WastedMoney
Posts: 8
Joined: 18 Jun 2017 08:30

Re: Noob help with script

Post by WastedMoney »

Further to my last, it will only handle 769 files, the same error pops up if there are 770 (and above) files.

Cheers

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: Noob help with script

Post by highend »

With both of the last two commands?
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

WastedMoney
Posts: 8
Joined: 18 Jun 2017 08:30

Re: Noob help with script

Post by WastedMoney »

highend wrote: 20 Nov 2023 09:37 It's not about the number of files but the total length of the command line argument you're passing to Mp3Tag.

The solution is easy, call it with just the folder :P

Code: Select all

    run lax("D:\01. Applications\Mp3tag\Mp3tag.exe" "<curpath>");
// or
    openwith "D:\01. Applications\Mp3tag\Mp3tag.exe", , "<curpath>";
DING DING DING DING DING.

And we have a winner. Easily opened all of them.

Once again, thanks very much for all the help with this, muchly appreciated.

Cheers

Post Reply