Code not working

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
CookieMonster

Code not working

Post by CookieMonster »

Beginning to touch scripting, although the following code isn't working ?

Code: Select all

if(exists("C:\Transfer")){
msg "Yes";
}else{
msg "No";
}

jupe
Posts: 2794
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Code not working

Post by jupe »

https://www.xyplorer.com/tour.php?page=scripting

Read the rules under Syntax, pay attention to the one about indentation.

viewtopic.php?f=7&t=13831&p=126222#p126222

Moving this to Q&A

CookieMonster

Re: Code not working

Post by CookieMonster »

Code: Select all

$flist = listfolder("C:\Apple","Q",1);
msg $flist
Why doesn't the variable $flist print the result ?

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Code not working

Post by highend »

Probably because there are no files with a name that contains "q" inside that folder?
One of my scripts helped you out? Please donate via Paypal

CookieMonster

Re: Code not working

Post by CookieMonster »

I have a few files which either begin or have the letter "Q" in their file name.

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Code not working

Post by highend »

Code: Select all

text "_" . quicksearch("*q* /fn", "C:\Apple") . "_";
Show the result
One of my scripts helped you out? Please donate via Paypal

Post Reply