Finding a folder
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Finding a folder
Hi,
I need to determine if a folder exists already. I am going to use a folder to store all my app related files and information, and I know how to create the folder if it does not exist. But, how to I tell if it is already there?
Thanks,
--Doug
I need to determine if a folder exists already. I am going to use a folder to store all my app related files and information, and I know how to create the folder if it does not exist. But, how to I tell if it is already there?
Thanks,
--Doug
Re: Finding a folder
Hi Doug,
try
there is
from the dictionary:
there is a {object | file filePath | folder folderPath | process procName}
regards
Bernd
try
there is
from the dictionary:
there is a {object | file filePath | folder folderPath | process procName}
regards
Bernd
Re: Finding a folder
Perfect. That's exactly what I need. I never would have thought about looking up that.
thanks,
--Doug
thanks,
--Doug
Re: Finding a folder
Excellent, I wouldn't have thought of "there is," either.
Still, there is something else, elated to this question that I would like to know. The dictionary entry states,
Still, there is something else, elated to this question that I would like to know. The dictionary entry states,
But where is the defaultFolder? Yes, it can be set, but what if I want to locate something in the same folder from which the stack was started? In the dictionary entry for defaultFolder, we read,The folderPath specifies the name and location of a folder you want to check. If you specify a name but not a location, Revolution looks for the folder in the defaultFolder.
Can the defaultFolder be set to the same folder from which the stack was started (irrespective of where it resides)?When a Revolution application starts up, the defaultFolder initially contains whatever the working directory was at the time the application was launched. Typically this is the folder that the application resides in, however this is not always the case and shouldn't be relied on. It is best always to set the defaultFolder before using relative paths.
Re: Finding a folder
Hi Exheusden,
the whole is a bit tricky.
have a look here (in lessons)
http://lessons.runrev.com/spaces/lesson ... esides-in-
and here (also in lessons)
http://lessons.runrev.com/spaces/lesson ... nd-Windows
You can access some Livedode functions only if you first set the default folder. E.g. the files or the folders.
The thing is that depending on whether you want to save from a standalone or from the IDE things differ. But the lessons show you how.
Kind regards
Bernd
the whole is a bit tricky.
have a look here (in lessons)
http://lessons.runrev.com/spaces/lesson ... esides-in-
and here (also in lessons)
http://lessons.runrev.com/spaces/lesson ... nd-Windows
You can access some Livedode functions only if you first set the default folder. E.g. the files or the folders.
The thing is that depending on whether you want to save from a standalone or from the IDE things differ. But the lessons show you how.
Kind regards
Bernd
Re: Finding a folder
Excellent. Thank you very much.