# Suggestion - CLI to run Web Source Script

**URL:** https://community.mp3tag.de/t/suggestion-cli-to-run-web-source-script/51968
**Category:** General Discussion
**Created:** [February 13, 2021, 8:45pm UTC](https://community.mp3tag.de/t/suggestion-cli-to-run-web-source-script/51968 "2021-02-13T20:45:58Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [February 13, 2021, 8:45pm UTC](https://community.mp3tag.de/t/suggestion-cli-to-run-web-source-script/51968/1 "2021-02-13T20:45:58Z")

</div>

It would be a nice addition to do this:

**So:**  
`Mp3tag.exe /wss:"<Name of script>" /fp:"<full-qualified path to directory>"`

Will load the files from the folder and run the script as normal. Giving the usual options.

`Mp3tag.exe /wss:"<Name of script>" /fn:"<full-qualified file name>"`

Starts Mp3tag with the specified audio file using the directory of the file as working directory using the web source script.

To add to these, [Command Line Interface – Mp3tag Documentation](https://docs.mp3tag.de/command-line)

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [February 14, 2021, 8:52am UTC](https://community.mp3tag.de/t/suggestion-cli-to-run-web-source-script/51968/2 "2021-02-14T08:52:22Z")

</div>

I have my problems to imagine how my workflow would look like if this feature got implemented - perhaps you can help a little.  
In general: would MP3tag open the GUI or run silently?  
So, taking

> [@stevehero](#):
>
> Mp3tag.exe /wss:""

like that would leave me with the question: which files would be treated by that wss?  
Would I have to supply a folder or at least a single file as well or would the standard folder be used?  
What happens if that folder does not only contain a single album but is e.g. my folder for podcasts (which would probably not create a lot of hits with the most prominent wss). What happens if only one file from that folder leads to a hit and all the others would be overwritten with the wrong data if I took that suggestion? (I think I would have to abort that wss-call and start from scratch with just one file selected ...)  
What happens if no file is loaded? (Because I always start in an empty folder / because I forgot to include the filename in the command line.)  
I assume that all further wss-steps like selection of the issue, arrangement of files in the correct order would then be carried out as usual with user-interaction (which in a way answers the question whether MP3tag would run silently), yet, if the idea was to run the wss sort of automatically, it would have been interesting to see how the correct data would be assigned.  
Perhaps you could elaborate your idea a little.

Just as side note: it has been requested some years ago to run actions via command line, see here

> [@Feature request: command line bare essential: call an action](https://community.mp3tag.de/t/feature-request-command-line-bare-essential-call-an-action/10271):
>
> So I use the command line Tag.exe utility that comes packaged with flac. But Mp3tag blows it out of the water with its regexp and other functions thanks to your monumental work! The fact that such power can't be run from a script seems to be the main thing holding it back. I think you would help save countless man hours everybody spends overall with just one command line possibility: run an action. For example, a user could create an action group within the Mp3tag GUI that cleans up tags into …

(and there are more with this idea)

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [February 14, 2021, 12:51pm UTC](https://community.mp3tag.de/t/suggestion-cli-to-run-web-source-script/51968/3 "2021-02-14T12:51:19Z")

</div>

Yes, the file or folder would need to be supplied along with the web source script.

So:  
`Mp3tag.exe /wss:"<Name of script>" /fp:"<full-qualified path to directory>"`

Will load the files from the folder and run the script as normal. Giving the usual options.

`Mp3tag.exe /wss:"<Name of script>" /fn:"<full-qualified file name>"`

Starts Mp3tag with the specified audio file using the directory of the file as working directory using the web source script.

It would just be a quick way to run them inside foobar2000 using the foo\_run plug in.

---

<div class="post-metadata">

### Author: ![Romano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/romano/32/7465_2.png) [@Romano](https://community.mp3tag.de/u/Romano)
#### Post date: [February 14, 2021, 3:04pm UTC](https://community.mp3tag.de/t/suggestion-cli-to-run-web-source-script/51968/4 "2021-02-14T15:04:28Z")

</div>

Yes this would be a nice addition. Per example i will use it in my python scripts.

---

<div class="post-metadata">

### Author: ![mp3outie](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@mp3outie](https://community.mp3tag.de/u/mp3outie)
#### Post date: [February 14, 2021, 5:11pm UTC](https://community.mp3tag.de/t/suggestion-cli-to-run-web-source-script/51968/5 "2021-02-14T17:11:26Z")

</div>

My vote would be for it to run silently and would be okay with risk of script user error when specifying an entire folder. But you could first handle single file case, then hopefully take up the actions script ability I suggested ten years ago from the link you quoted. Thank you for your program!

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [February 14, 2021, 5:27pm UTC](https://community.mp3tag.de/t/suggestion-cli-to-run-web-source-script/51968/6 "2021-02-14T17:27:57Z")

</div>

> [@mp3outie](#):
>
> My vote would be for it to run silently and would be okay

Thank you 😄

There could be a `/silent` switch in there also.

The undo function in mp3tag could undo those changes.

Possibly another CLI command.

`Mp3tag.exe /undo`  
or  
`Mp3tag.exe /undolast`

Something along those lines.

The Silent switch would need to be used with direct scripts. But to start off with just having the ability to directly run a script would be a good start without getting too far ahead of ourselves.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [February 14, 2021, 5:50pm UTC](https://community.mp3tag.de/t/suggestion-cli-to-run-web-source-script/51968/7 "2021-02-14T17:50:54Z")

</div>

While you get all excited about further functions that might be triggered in the command line, I would like to draw your attention to this thread:

> [@Hi guys help with auto tagging please](https://community.mp3tag.de/t/hi-guys-help-with-auto-tagging-please/2084):
>
> hi guys, i have just discovered this excellent App. what i would like to know is is there a way i can drop a directory in and have the program automatically search/tag/rename? at the moment it works ok but i have to..... drop the directory in, select all (by pressing CTRL+a can this be done auto too?) click on the freedb icon, choose determine from the selected files, OK. then when i get the results thru (sometimes numerous/select correct) i OK. then it just renames the tags and not t…

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [February 16, 2021, 11:22pm UTC](https://community.mp3tag.de/t/suggestion-cli-to-run-web-source-script/51968/8 "2021-02-16T23:22:46Z")

</div>

I've written an AHK script to do this.

> [@AHK to auto run a Web Source Script from outside Mp3tag](https://community.mp3tag.de/t/ahk-to-auto-run-a-web-source-script-from-outside-mp3tag/52002):
>
> [[c1d42315529de62ba4bd4a95d867666d]](https://revolut.me/stephen147)Revolut Here's something I wrote to automatically run a script outside of Mp3tag, in my case foobar2000. Any CLI will work so long as AHK is supported. It'll ask the user to close once the saved file operation is finished. So all you'd have to do is go through the List of search results window and then ensure the adjust tag info is ok. Then a yes, no dialog where all you need to do is press enter to close Mp3tag. So 3 baby steps babyYou need to c…
