#1 : 25/04-24 17:36 raf
Posts: 12
|
How do I use the CLI to run advanced renamer scripts in powershell? Is there documentation?
|
#2 : 25/04-24 21:24 Delta Foxtrot
Posts: 323
|
Reply to #1:
Hi Raf, Well, there's the documentation in the ARen User Guide, but I suspect you already know about that. What I only learned about recently (I believe it was thanks to Styb here, but it may have been Miguel) is the menu item in ARen, "Tools/Command line"... It allows you to build a command line execution string visually. Just as an example, here's a command line string I composed in just a few seconds that I'd have been scratching my head over if I had to cobble it together without help: "C:\Program Files\Advanced Renamer\arenc.exe" -e C:\Users\Delta\ADVANCED_RENAMER_Scripts\_Sandbox\SCRIPT_test_2.aren -t folders -p C:\Users\Delta\Pictures -s -o foldername -m move -d D:\Media\JPG -l "C:\Users\Delta\ADVANCED_RENAMER_Scripts\ERROR Lists\test_2_1stRun.log" (You can also just output it to a fully-formed .BAT windows batch file, which can be useful too) Anyway, once you have your saved batch method all bundled up in a command line string you really just need to invoke it in PowerShell–but of course there are several different ways to do that; nothing is simple in PowerShell. :) I found this article to be extremely helpful: https://www.guidingtech.com/run-executable-from- powershell/ At its most basic, just put the PowerShell "call" operator (&), an ampersand, at the start of the command line you created in ARen. Hope this helps. Sorry if this was a lot more than you wanted to read. :) Best, DF |