[AccessD] Grab filenames

Charlotte Foust cfoust at infostatsystems.com
Mon May 19 10:35:29 CDT 2003


What version of Access are you using?  It wasn't available in 97, but
you did have access to the FileSystem object through VBA.
 
Charlotte Foust

	-----Original Message-----
	From: Roz Clarke [mailto:roz.clarke at donnslaw.co.uk] 
	Sent: Monday, May 19, 2003 7:25 AM
	To: 'accessd at databaseadvisors.com'
	Subject: RE: [AccessD] Grab filenames
	
	
	thanks Charlotte, this looks great. I had never heard of the
filesearch object! learn something new every day :)
	 
	Roz

		-----Original Message-----
		From: Charlotte Foust
[mailto:cfoust at infostatsystems.com] 
		Sent: 19 May 2003 16:03
		To: accessd at databaseadvisors.com
		Subject: RE: [AccessD] Grab filenames
		
		
		I think you'd have to do it with a FileSearch and write
the results of each FoundFiles item into the table.  Here's a FileSearch
sample.
		 
		Sub SimpleSearch()
		  'Perform simple search using the FileSearch object,\.
		  Dim varItem as Variant
		  With Application.Filesearch
		    .NewSearch
		    .FileName = "*.ini"
		    .LookIn = "C:\Windows"
		    .Execute
		    For Each varItem in .foundFiles
		      Debug.print varItem
		    Next varItem
		  End With
		End Sub
		 
		Charlotte Foust

			-----Original Message-----
			From: Roz Clarke
[mailto:roz.clarke at donnslaw.co.uk] 
			Sent: Monday, May 19, 2003 6:54 AM
			To: 'accessd at databaseadvisors.com'
			Subject: [AccessD] Grab filenames
			
			

			Hi all 

			Does anyone have a code snippet for pulling file
search results into Access? 

			What I want is to pull the filename, path & size
of all files of a given type on a particular drive, including those in
subfolders, into a table. I need to do it *fast*!!!

			TIA 

			Roz 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030519/9d03e6f2/attachment-0001.html>


More information about the AccessD mailing list