Script if <curitem> is *.lnk run this command, if any other file extension or folder, run that...

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
cadu
Posts: 247
Joined: 18 Mar 2012 21:50

Script if <curitem> is *.lnk run this command, if any other file extension or folder, run that...

Post by cadu » 27 Sep 2019 13:04

Hi,

I'd appreciate your help to elaborate a script syntax based on the condition:

if <curitem> has *.lnk extension, run command #4000
if <curitem> has any other extension, or is a folder, then run command #4001

Is this script viable? What would be the syntax?

Thank you very much!

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

Re: Script if <curitem> is *.lnk run this command, if any other file extension or folder, run that...

Post by highend » 27 Sep 2019 13:37

Code: Select all

    if (exists(<curitem>) == 1 && gpc(<curitem>, "ext") LikeI "lnk") { #4000; }
    else { #4001; }
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

cadu
Posts: 247
Joined: 18 Mar 2012 21:50

Re: Script if <curitem> is *.lnk run this command, if any other file extension or folder, run that...

Post by cadu » 27 Sep 2019 21:35

Thank you very much @highend

Post Reply