+ Reply to Thread
Results 1 to 2 of 2

Search directory

  1. #1
    Registered User
    Join Date
    06-14-2007
    Posts
    18

    Search directory

    Hi

    With a bit of help I have compiled the following code to produce folders within our job file named as per our job list.

    As this 'Automated Naming System' has been created further down the line as there are hundreds of job folders already present that called be named slightly different that i do not want to receate.

    One constant that is already present is a job number, namely "001.F08","002.F08", etc.

    Before the code creates the folder, I would like to search within the directory for any folders beginning with this job number. And present an error if one is found

    The individual job numbers are kept in (y,18)



    Please Login or Register  to view this content.

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573
    You can use Dir() to determine if a folder exists. Do not include a trailing backslash. e.g.
    Please Login or Register  to view this content.
    I would make 2 suggestions to improve your code.
    1. Assign a variable to builder the drive and base folder.
    2. Put your string values for subfolder names into and array and use a For loop.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1