Page 1 of 1

Check if file or folder

Posted: Thu Jul 02, 2009 10:59 pm
by wake
How do I evaluate a string value as being a file or a folder?

I have a Scrolling List Field that supports drag and drop and I want to loop through the list and determine which entries are files and which are folders.

Probably another simple solution that I am just not seeing.

I am really having a hard time with the whole "Write code in English thing". LOL

Posted: Fri Jul 03, 2009 12:07 am
by Mark
Hi wake,

Code: Select all

if there is a folder "folder name" then
  -- it is a folder
else if there is a file "file name" then
  -- it is a file
else
  -- it doesn't exist
end if
Best regards,

Mark

Posted: Fri Jul 03, 2009 4:11 pm
by wake
Mark,
Thanks for the help. This worked perfectly!