Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2003
    Posts
    29

    Grin Global Variables

    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

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    If you want the Root of the Drive that windows is on, you could do this:

    WindowsRoot=String.Left(_WindowsFolder, 3)

  3. #3
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    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

  4. #4
    Join Date
    Aug 2003
    Posts
    29
    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.

  5. #5
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    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.

  6. #6
    Join Date
    Aug 2003
    Posts
    29
    The problem is I need a true or false not the location of the file put into the Result variable..

  7. #7
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    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

  8. #8
    Join Date
    Aug 2003
    Posts
    29
    Excellent got it to work thanks !!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts