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: 287
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 »

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: 13274
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 »

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

cadu
Posts: 287
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 »

Thank you very much @highend

Post Reply