New call-to-action
Results 1 to 4 of 4

Thread: Opening a folder in windows

  1. #1
    Member
    Real Name
    Donald Raymond
    Join Date
    Jul 2000
    Location
    Long Island, NY
    Posts
    153

    Default Opening a folder in windows

    I am running A5V4.5 and was wondering if there was a way to open a windows folder from a button on a form. I know in 4.5 there is a run command that will open an .exe file, but it only accepts an .exe file. If possible, this is what I would want to do: Press a button on a form that would first assign a field value to a variable (no problem), example var->QuoteNum="08-005". Then "shell out" to windows - if a folder at a certain path is already named "var->QuoteNum", open it;otherwise create a folder named "var->QuoteNum" and open it.

    My first guess would be that this is not possible or easily done.

    Thanks,
    Don Raymond

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Opening a folder in windows

    As for opening the folder, see if UI_GET_PATH() is available in your version. I don't remember if it is.

    Code:
    FILEFIND.GET( "c:\temp\atest",FILE_FIND_DIRECTORY, "D" )
    returns "D" if the directory c:\temp\atest exists, blank "" if it doesn't.
    Last edited by Stan Mathews; 01-04-2008 at 02:15 PM.

  3. #3
    Member
    Real Name
    Donald Raymond
    Join Date
    Jul 2000
    Location
    Long Island, NY
    Posts
    153

    Default Re: Opening a folder in windows

    Stan,

    V4.5 does not seem to support UI_GET_PATH() or FILEFIND.GET(). There is a File.exists() which could be used to check for a file, but I don't think a folder.

    Don

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Opening a folder in windows

    To test for a directory with file.exists() leave off the trailing backslash....

    ? file.exists("c:\temp\atest")
    = .T.

    tests for the existence of the "atest" directory.

Similar Threads

  1. Find name of Windows folder
    By Bill Warner in forum Alpha Five Version 5
    Replies: 34
    Last Post: 11-21-2004, 03:18 AM
  2. Emulating Windows folder/file structure in A5
    By MS in forum Alpha Five Version 5
    Replies: 9
    Last Post: 01-31-2003, 02:39 PM
  3. Opening form, not opening to correct record
    By W. Horton in forum Alpha Five Version 4
    Replies: 5
    Last Post: 11-27-2002, 07:52 AM
  4. Opening *.dbf files from Windows
    By Robin Sculthorpe in forum Alpha Five Version 5
    Replies: 3
    Last Post: 11-01-2002, 03:14 AM
  5. Windows 2000 Server with Windows 98 Client
    By Veronica Perez in forum Alpha Four Version 6 and Prior
    Replies: 1
    Last Post: 07-03-2002, 05:09 AM

Bookmarks

Posting Permissions

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