Results 1 to 3 of 3

Thread: Extract File Management Info

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2004
    Posts
    3

    Extract File Management Info

    I need to extract the exact same items that a file search finds and parses - file name, full path (without file name) and date - and send these items to sql to populate a simple 3-field table.

    We have a directory that is updated daily and I need a sql table that reflects the updated list of files, folders, and dates - this information is used to provide easy access to the files through a simple web interface. The directories are not always the same, and the depth of the sub-directories may change also.

    This needs to be an easy procedure which can be run as a timed procedure on a pc at night - with absolutely no interaction from a person.

    Does anyone have any ideas?

    Here is some vba code I have that works to collect some of the correct info inside Excel - but I need it to be standalone.

    Sub IndexFiles()
    With Application.FileSearch
    .LookIn = "C:\student\ipao\data"
    .FileType = msoFileTypeAllFiles
    .SearchSubFolders = True
    .Execute
    End With
    cnt = Application.FileSearch.FoundFiles.Count
    For i = 1 To cnt

    ' sets the cell reference for each result - a1, a2 a3 a4...
    Rng = "A" & i
    Range(Rng).Value = Application.FileSearch.FoundFiles.Item(i)

    Rng = "B" & i
    Range(Rng).Value = FileDateTime(Application.FileSearch.FoundFiles.Item(i))


    Next i
    End Sub

    Thanks so much (ahead of time) for your help!
    Last edited by Bauerchick; May 27th, 2004 at 11:52 AM.
    Thanks!~
    Bauerchick

Posting Permissions

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



Click Here to Expand Forum to Full Width