Alpha Video Training
Results 1 to 2 of 2

Thread: Problem with dir_put

  1. #1
    Member Graham Wickens's Avatar
    Real Name
    Graham Wickens
    Join Date
    Apr 2000
    Gloucestershire, UK

    Default Problem with dir_put

    The following dialog prompts for a folder and the prompt for a file in that folder, at least that is my intention.

    DIM SHARED vFolder as c
    DIM SHARED vResult as C
    DIM SHARED vImageName as c
    old_directory = dir_get()
    vResult = ui_dlg_box("",<<%dlg1%
    Folder:|[%p=ui_get_path("Select Folder","i:;","I:\my databases\bitmaps");I=$a5_folder%.40vFolder!ChangeFolder];
    <*15OK!OK> <15Cancel!CANCEL>
    if a_dlg_button = "ChangeFolder" then
        a_dlg_button = ""
        vFolder = strip_trailing_char(vFolder,"\\")
    Image:| [%fBMP (*.bmp)|JPG (*.jpg)%.40vImageName];
    <*15OK!OK> <15Cancel!CANCEL>;
    end if
    the problem is that neither file.dir_put or dir_put seem to work.
    Support your local Search and Rescue Unit, Get Lost!

  2. #2
    "Certified" Alphaholic
    Real Name
    Finian Lennon
    Join Date
    Apr 2000
    Atlanta, GA

    Default Re: Problem with dir_put

    I stopped using dir_put() a long time ago. I don't know if this is relevant to your needs but: if you need to check if file exists in a folder use filefind.get() - it can tell you everything you need to know about a folder and its contents, and it's fast - and then send the results to a list box if you need to see the contents. If you want to save a file to a folder, always use A5_is_path_Valid() first to be sure the folder exists and, if it doesn't, use dir_create_recurse() to create it. If the folder exists you can display the contents as above. All the file related functions you are likely to want to use accept a full path as an argument, so I've found that a combination of the these takes care of things.

    Hope this helps.

Similar Threads

  1. Publishing problem or app server problem
    By Terrymorgan in forum Mobile & Browser Applications
    Replies: 6
    Last Post: 06-11-2015, 04:44 PM
  2. Index Problem... Maybe a Backup Problem???
    By michaelwpayton in forum Alpha Five Version 9 - Desktop Applications
    Replies: 5
    Last Post: 01-24-2009, 05:49 PM
  3. Subreport problem. Filter problem?
    By ray camo in forum Alpha Five Version 9 - Desktop Applications
    Replies: 2
    Last Post: 11-15-2008, 03:27 PM
  4. Date problem US/UK formatting. Resurrecting old problem
    By Robert Rough in forum Web Application Server v7
    Replies: 2
    Last Post: 03-06-2007, 02:33 AM
  5. A_Gloss.Dbf appears after dir_put(a5.get_path())
    By mronck in forum Alpha Five Version 5
    Replies: 0
    Last Post: 12-11-2003, 04:16 AM


Posting Permissions

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