Re: Folder
From: Dirk Goldgar (dg_at_NOdataSPAMgnostics.com)
Date: 08/17/04
- Next message: Stephen Rasey: "Re: MD5 Hash with single quote = grief in dao.findfirst"
- Previous message: Dirk Goldgar: "Re: speeding up a query"
- In reply to: Vina: "Re: Folder"
- Next in thread: Vina: "Re: Folder"
- Reply: Vina: "Re: Folder"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 16 Aug 2004 23:48:44 -0400
"Vina" <tvae@att.net> wrote in message
news:774d01c48408$6d256ab0$a601280a@phx.gbl
> Dirk,
>
> Thanks for this, it work really great but one more
> question. How can i add to get the full path of the file.
> I am planning to just search the whole C:\ drive so i
> need to get the full path for the files found.
>
> Really appreciate your help.
>> -----Original Message-----
>> "Vina" <tvae@att.net> wrote in message
>> news:741401c483c6$362b09d0$a601280a@phx.gbl
>>> is it possible to create something that it will look at a
>>> certain folder and look for MDB's in that folder and then
>>> to look on the details on that folder to when it was
>>> modified and write all these in a table. It is possible
>>> to be done in access.
>>>
>>> Can someone give me an idea how to go about this.
>>>
>>> Thanks
>>> Vina
>>
>> Sure. Something like this "air code":
>>
>> '----- start of code -----
>> Dim db As DAO.Database
>> Dim strFolder As String
>> Dim strFileName As String
>> Dim dtFileDate As String
>>
>> strFolder = "C:\Temp\"
>>
>> Set db = CurrentDb
>>
>> strFileName = Dir(strFolder & "*.mdb")
>> Do Until Len(strFileName) = 0
>> db.Execute _
>> "INSERT INTO tblMDBList " & _
>> "(FileName, FileDate) " & _
>> "VALUES('" & _
>> strFileName & _
>> "', " & _
>> Format(FileDateTime(strFolder & strFileName), _
>> "\#mm/dd/yyyy hh:nn:ss AMPM\#") & _
>> ")", _
>> dbFailOnError
>>
>> strFileName = Dir()
>> Loop
>>
>> Set db = Nothing
>> '----- end of code -----
Change this:
>> "VALUES('" & _
>> strFileName & _
>> "', " & _
to this:
"VALUES('" & _
strFolder & strFileName & _
"', " & _
-- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup)
- Next message: Stephen Rasey: "Re: MD5 Hash with single quote = grief in dao.findfirst"
- Previous message: Dirk Goldgar: "Re: speeding up a query"
- In reply to: Vina: "Re: Folder"
- Next in thread: Vina: "Re: Folder"
- Reply: Vina: "Re: Folder"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|