Alpha Video Training
Results 1 to 3 of 3

Thread: Getting file (path) names

  1. #1
    Member
    Real Name
    Nick Oldfield
    Join Date
    Aug 2008
    Posts
    344

    Default Getting file (path) names

    I have a windows directory containing about 3000 jpeg images from various sources. I need to set up an alpha table containing just the path names to each image (not the images themselves) so that I can search them for file names that match (partially) an equipment model number. What's the easiest way to do this? I have done some experimenting with filefind and file exists but there seems to be no straightforward way to do this.

  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: Getting file (path) names

    You want a list of directories under a specified directory.

    For c:\temp the list would be


    filefind.get_recurse("C:\temp","*.*",FILE_FIND_DIRECTORY)

    to add records to the dirtable.dbf , pth field

    dirlist = filefind.get_recurse("C:\temp","*.*",FILE_FIND_DIRECTORY)
    tbl = table.open("dirtable")
    for each foo in dirlist
    tbl.enter_begin()
    tbl.pth = foo.value
    tbl.enter_end()
    next
    tbl.close()
    There can be only one.

  3. #3
    Member
    Real Name
    Nick Oldfield
    Join Date
    Aug 2008
    Posts
    344

    Default Re: Getting file (path) names

    Thanks, Stan, I will try it out....

Similar Threads

  1. Table Definition Field Names Truncating after file.copy and file.rename???
    By pulsoft in forum Alpha Five Version 11 - Desktop Applications
    Replies: 7
    Last Post: 01-30-2013, 11:44 AM
  2. get file path
    By jrturner0112 in forum Application Server Version 11 - Web/Browser Applications
    Replies: 7
    Last Post: 06-18-2012, 10:19 AM
  3. Mapped drives vs UNC path names in Target
    By dchiass in forum Alpha Five Version 10 - Desktop Applications
    Replies: 1
    Last Post: 07-07-2010, 05:23 PM
  4. Replies: 10
    Last Post: 06-13-2007, 07:59 AM
  5. File path
    By dcorcoran in forum Alpha Five Version 6
    Replies: 3
    Last Post: 05-11-2005, 05:40 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
  •