Folder.DoesExist |
|
|
|
Folder.DoesExist |
|
|
|
|
||
OverviewExamples
does_exist = Folder.DoesExist("C:\\Magic");
Stores true in a variable named "does_exist" if the "Magic" folder exists at "C:\Magic", and false if it doesn't.
bIs_There = Folder.DoesExist(_SystemFolder..\\TempComponents");
Checks to see if the folder "TempComponents" exists in the user's System folder and stores either true or false accordingly in the variable "bIs_There." The concatenation operator (..) is used here to concatenate the System folder path with "\TempComponents."
Tip: Starting a variable name with "b" is a technique that programmers use to help themselves remember that a variable contains a boolean value.
-- Check to see if a specific folder exists.
does_exist = Folder.DoesExist(_TempFolder);
-- Display a dialog telling the user whether or not the folder exists.
if does_exist then
Dialog.Message("Notice", "Yes, the folder does exist on your system.", MB_OK, MB_ICONINFORMATION);
else
Dialog.Message("Notice", "No, the folder does not exist on your system.", MB_OK, MB_ICONINFORMATION);
end
Checks to see if the temp folder exists on the user's machine and notifies the user using a dialog message.
See also: Related Actions
Learn More: Indigo Rose Software - MSI Factory - Buy Now - Contact Us