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
    Location
    Gloucestershire, UK
    Posts
    732

    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.

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

    www.westrowops.co.uk

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

    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.
    Finian

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

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
  •