Directories, folders, and files

  • Thread starter Thread starter m stroup
  • Start date Start date
M

m stroup

I am using dir() with arguments for the directory and folder from input boxes.

Dir(directory & ":\" & filefolder & "\*.*") I am then placing this in a
table, if this document is not in the table as yet.

I would like to use an input box for the directory, but have it search
through folders and subfolders without having to input a folder name.

Any help is appreciated.
 
So if I understand you properly, you only want to input the LAST folder name,
and have the computer search through all folders for that last one? So if you
had this path:

C:\Dir1\Dir2\Dir3\Dir4\Dir5\MyDir

You'd only want to enter "MyDir", and have the PC search the entire
directory structure for any instances of "MyDir"?

Is that right?

If so, how would you handle multiple "MyDir" entries in different paths?
Also, are you aware of the overhead and duration that a SEARCH generates? Are
your users willing to wait 2-5 minutes (for large directory trees)?
 
I need to track documents placed on a shared drive. I have
tblFiles.[filename] and frmFiles.txtfilename. My goal is to have an
updatable list of the complete path for every file in a particular directory,
no matter which folder/subfolder.

I was able to do this easily for files in the directory, but files in the
folders/subfolders create a problem. I think it could be done using nested
loops and the dir() function, but I am not sure how to check for the folders.

S:\myfolder\mysubfolder\myfile.xls
S:\myfile.mdb
S:\myfolder\myfile.doc
 
See whether http://my.advisor.com/doc/16279 helps

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


m stroup said:
I need to track documents placed on a shared drive. I have
tblFiles.[filename] and frmFiles.txtfilename. My goal is to have an
updatable list of the complete path for every file in a particular
directory,
no matter which folder/subfolder.

I was able to do this easily for files in the directory, but files in the
folders/subfolders create a problem. I think it could be done using
nested
loops and the dir() function, but I am not sure how to check for the
folders.

S:\myfolder\mysubfolder\myfile.xls
S:\myfile.mdb
S:\myfolder\myfile.doc

--
Teach me to fish! Thanks for the help.
Pax, M


Dennis said:
So if I understand you properly, you only want to input the LAST folder
name,
and have the computer search through all folders for that last one? So if
you
had this path:

C:\Dir1\Dir2\Dir3\Dir4\Dir5\MyDir

You'd only want to enter "MyDir", and have the PC search the entire
directory structure for any instances of "MyDir"?

Is that right?

If so, how would you handle multiple "MyDir" entries in different paths?
Also, are you aware of the overhead and duration that a SEARCH generates?
Are
your users willing to wait 2-5 minutes (for large directory trees)?
 
I scanned through the article and it looks like just what I need. It is
simple enough for even rookies like myself to understand. Not sure which
approach to take yet but I love learning, so maybe I'll play with each of the
options. Thanks Doug.
--
Teach me to fish! Thanks for the help.
Pax, M


Douglas J. Steele said:
See whether http://my.advisor.com/doc/16279 helps

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


m stroup said:
I need to track documents placed on a shared drive. I have
tblFiles.[filename] and frmFiles.txtfilename. My goal is to have an
updatable list of the complete path for every file in a particular
directory,
no matter which folder/subfolder.

I was able to do this easily for files in the directory, but files in the
folders/subfolders create a problem. I think it could be done using
nested
loops and the dir() function, but I am not sure how to check for the
folders.

S:\myfolder\mysubfolder\myfile.xls
S:\myfile.mdb
S:\myfolder\myfile.doc

--
Teach me to fish! Thanks for the help.
Pax, M


Dennis said:
So if I understand you properly, you only want to input the LAST folder
name,
and have the computer search through all folders for that last one? So if
you
had this path:

C:\Dir1\Dir2\Dir3\Dir4\Dir5\MyDir

You'd only want to enter "MyDir", and have the PC search the entire
directory structure for any instances of "MyDir"?

Is that right?

If so, how would you handle multiple "MyDir" entries in different paths?
Also, are you aware of the overhead and duration that a SEARCH generates?
Are
your users willing to wait 2-5 minutes (for large directory trees)?

:

I am using dir() with arguments for the directory and folder from input
boxes.

Dir(directory & ":\" & filefolder & "\*.*") I am then placing this in
a
table, if this document is not in the table as yet.

I would like to use an input box for the directory, but have it search
through folders and subfolders without having to input a folder name.

Any help is appreciated.
 
Back
Top