Is there a global variable for just the c:\ for example _WindowsFolder = C:\Windows or
_SystemFolder = C:\Windows\System
I'm looking for just the root of C:\
Thanks
Lance
Professional Software Development Tools
Is there a global variable for just the c:\ for example _WindowsFolder = C:\Windows or
_SystemFolder = C:\Windows\System
I'm looking for just the root of C:\
Thanks
Lance
If you want the Root of the Drive that windows is on, you could do this:
WindowsRoot=String.Left(_WindowsFolder, 3)
Or you could use this
_CFolder = "C:\\"
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Yes but what I'm doing is searhing for a file. I do not know where the file is. If I creat a _cfolder = "c:\\" and use that in the
file.doesexist then it will only search the root of the c drive I need it to search all of the c drive not just the root.
I already answered this in a prior thread. If it's only the "C:\ drive" that you're concerned with (and not a source drive or something else), then all you need to do is search for the file, populate a table and ""recurse"" the sub-folders. Recurse meaning to search any and all folders/sub-folders on the C:\ drive. May take a while on some systems.
The problem is I need a true or false not the location of the file put into the Result variable..
Use File.Find instead to search recursively through the directories. If the returned variable is nil then your file was not found
result = File.Find("C:\\", "yourfile.ext", true, true, nil);
if result == nil then
--your file was not found
else
--do something with the file here
end
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Excellent got it to work thanks !!!!!