Ambimind Posted June 27, 2016 Report Share Posted June 27, 2016 Ketarin variables and their equivalents: The variables are placed into four groups according to essential character. Ketarin Powershell -------- ------------ [Native] {filesize} $app.LastFileSize {category} $app.Category {appname} $app.Name or $app {appguid} $app.Guid {file} [$file =] $app.CurrentLocation [Derived : refer to {file}] {url:ext} (Get-Item $file).Extension {url:basefile} (Get-Item $file).Basename (result: ccleaner) {root} split-path $file -Qualifier (result: C:) (PWD).drive.root (result: C:\) Job/App dir (Get-Item $file).DirectoryName (no trailing \) File.Ext (Get-Item $file).Name {startuppath} PWD (assumes no prior CD) (no trailing \) [Job specific user defined variables] {"myvar"} $app.variables."myvar".CachedContent $app.variables."myvar".TextualContent [User-defined global variables] {"myglobalvar"} $globalvars."myglobalvar".CachedContent How to make their use more convenient ? The native Ketarin syntax is very convenient. To assist in making the Powershell equivalents more so, you may do the following. At the beginning of each cammand input insert a predefined, saved snippet that looks something like this: $file = $app.CurrentLocation $fdir = (Get-Item $file).DirectoryName $fnm = (Get-Item $file).Basename $fext = (Get-Item $file).Extension $fnmext = (Get-Item $file).Name $kroot = PWD How do you know this without official documentation ? From within a Ketarin command input, set to "Powershell script", and type: $app | Select-Object * | Out-File c:\app.txt -width 400 $globalvars | Select-Object * | Out-File c:\globalvars.txt -width 400 Repeat whenever you encounter a property which refers to a sub-object, ie. {.....}. Also, don't forget "Get-Member" and "Get-Member -Force". Link to comment Share on other sites More sharing options...
automateman Posted September 18, 2018 Report Share Posted September 18, 2018 Is there a version variable maybe? Link to comment Share on other sites More sharing options...
shawn Posted September 19, 2018 Report Share Posted September 19, 2018 version is a constructed variable for applications based on FileHippo and a manual variable for other applications. the same methods work to identify the available variables. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now