What's the syntax to check if a local folder exists?
Björnke von Gierke
bvg at mac.com
Tue Jun 7 11:13:52 EDT 2011
You got lots of responses about wether a folder exists, but to check if a folder does not contain files ("is empty") one has to do a rather complex script:
function folderIsEmpty theValidPath
set the defaultFolder to theValidPath
put the files into theList
filter theList without ".*"
if the number of words in theList <= 0 then
return "empty"
end if
end folderIsEmpty
Maybe there's additional problems with invisible and hidden files on windows?
Cheers
Björnke
On 7 Jun 2011, at 16:16, Keith Clarke wrote:
> Hi folks,
> I've tried to check if a folder 'is empty' or 'is not true' but I'm obviously missing the magic word - and I know it's not 'please', as LiveCode ignores all my pleading! ;-)
> Why do I get the feeling it's another one of those 'obvious as soon as you know it' things(?)
> Best,
> Keith..
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list