Recursive folder searching

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Investigator
    New Member
    • Oct 2009
    • 2

    Recursive folder searching

    HI.... Another newbe to the site.... looking for a little help.

    I have a DB for the purpose of Invetsigations, each time that a new case is opened the process generate two new folders (1.Photos and 2.Doc's) these are contained on the server in K:\Enforcement\ Investigated_Ca ses\ENF xxxx (xxx=the new job number)

    My team download photos taht are taken and are supposed to save them into the respective Photo folder.... unfortunately, sometimes they don't.

    I need to create a module to search the complete Investigated_Ca ses folder in each ENFxxx folder and check if there are any .jpg present, if so i then need to move any jpg's to the respective Photo Folder.

    Hope this makes sense.... Is anyone able to help me.... please
  • smartchap
    New Member
    • Dec 2007
    • 236

    #2
    First of all where is your team loading .jpg files, in K:\Enforcement\ Investigated_Ca ses\ENF xxxx folder or somewhere else. And I think each ENF xxxx folder has two folders named Photos and Docs. How the number xxxx is created? Is it a serial number, i.e. 1, 2, 3 and so on or something else? If it is a serial number with same increment then put the search code in a For...Next loop and search each K:\Enforcement\ Investigated_Ca ses\ENF xxxx folder and put the .jpg file found there to correcponding K:\Enforcement\ Investigated_Ca ses\ENF xxxx\Photos folder.

    Comment

    • Investigator
      New Member
      • Oct 2009
      • 2

      #3
      Hi Smartchap
      Thanks for the reply.....
      The Photo & Doc's folders are generated automatically when you create the next investigation referred to as [CustomerID], theses are now created sequentially. However the earlier jobs did not create Photo & Doc folders when a new file was opened, they simply created the ENF xxxx folder
      Hope this all makes sense….

      See the extracted text below from the complete section

      str1 = "K:\Enforcement \Investigated_C ases\ENF " & [CustomerID]:
      pho1 = "\Photos": doc1 = "\Doc's"

      ' ***** Create New Photo & Document Folder For New Case *****
      str2 = str1 + pho1: str3 = str1 + doc1
      MkDir str1: MkDir str2: MkDir str3
      str1 = "": str2 = "": str3 = ""

      Comment

      Working...