Possible ways to place a call to a PowerShell script?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Filehero
Posts: 2732
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Possible ways to place a call to a PowerShell script?

Post by Filehero »

Hi there,

today I'm validating XYPlorer's options for integration of my powershell/"DOS" script pool. After playing with some documented approaches (UDC, user buttons) I'm unsure wether I might already have taken the "getting lost" route... :?:

Here's my entry-level goal:
I want to run a simple powershell script/cmdlet without passing any parameter (e.g. <item>) from XYPlorer to it - just a do-on-click action.

Following call string has been validated to work (using a bat/cmd-file):

Code: Select all

"$anyPath\Console2\Console.exe" -r "Assert-File $anyPath\asserted.file > $anyPath\test_ps.txt"
*: <Assert-File> simply creates the given file when not existing; real paths are represented by the $anyPath-token

q1: what general approaches exist to put this action?
q2: does picking the right/best option depend on the need to pass XYPlorer items/variables? Other way round: what's the best option to choose without having to pass any params?
q3: with UDCs the only "category" working here is Open with?

Thanks a lot for your help.

Cheers,
Filehero

Twisten
Posts: 204
Joined: 27 Apr 2008 10:30

Re: Possible ways to place a call to a PowerShell script?

Post by Twisten »

Either 'open with' suits your needs or you can script and use the 'run' command.
With UDC you can pass built in paramaters such as <items>, with scripting you have more control and you can collect and format the information you want to pass on to your liking.

Filehero
Posts: 2732
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Re: Possible ways to place a call to a PowerShell script?

Post by Filehero »

Hi Twisten,

thank you for confirmation and summary of options. After a long evening of challenging XY under real-word project conditions, I seem to have found the Catalog to become _my_ natural home for those functional links.
In me there grows a certain feeling, I will have to buy this seemingly plain tool already next week. Just the MiniTree and the Catalog is pure functional gallore. Once you see and "feel" it you wonder why on earth all these blue-chip software giants' think tanks couldn't devise what a lone warrior was capable of coming up with.

Cologne rulez! :D


Cheers,
Filehero

admin
Site Admin
Posts: 66365
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Possible ways to place a call to a PowerShell script?

Post by admin »

YEAH! (Alaaf!)

Don

Filehero
Posts: 2732
Joined: 27 Feb 2012 18:50
Location: Windows 11@100%

Re: Possible ways to place a call to a PowerShell script?

Post by Filehero »

Even "timeout" has a very special meaning along the Niederrhein. :mrgreen:

.... now entering my lifetime license key - done! :D


Cheers,
Filehero

Post Reply