Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    47

    Smile File.DoesExist ?????

    Hi ...I'm trying to search for a file (divx.dll)in "C:\Windows\system32\" but can't seem to get it to work....I can get it to find a file (divx.dll) if the file resides in the windows directory only......as the code below shows....
    ----------------------------------------------------------------------------


    -- Checks to see if a particular file exists.
    Answer = File.DoesExist (_WindowsFolder.."\\dixv.dll");

    -- If the file does not exist, display a message notifying the user.
    if Answer == false then
    result = Dialog.Message("Notice", "The specified file does not exist.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

    else
    result = Dialog.Message("Notice", "The specified file EXISTS.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end

    ----------------------------------------------------------------------------

    I've tried changing the "_WindowsFolder" to a full path (eg. C:\windows\system32) but it doesn't return the correct answer, just says "The specified file does not exist."

    How do I get it to search the C:\windows\system32 directory for the divx.dll file ? My non-working code for this is below.....

    ----------------------------------------------------------------------------


    -- Checks to see if a particular file exists.
    Answer = File.DoesExist (C:\WINDOWS\system32 ,"\\dixv.dll");

    -- If the file does not exist, display a message notifying the user.
    if Answer == false then
    result = Dialog.Message("Notice", "The specified file does not exist.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

    else
    result = Dialog.Message("Notice", "The specified file EXISTS.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end

    ----------------------------------------------------------------------------

    Thanks for your help.

  2. #2
    Join Date
    Oct 2003
    Posts
    908
    Try using the global variable "_SystemFolder" rather than "_WindowsFolder"

    From the Command Reference: Variables/Global Variables
    http://www.indigorose.com/webhelp/am..._Variables.htm

    _SystemFolder
    The path to the user’s Windows System folder (e.g. "C:\Windows\System").

Posting Permissions

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