[AccessD] Access files by date

Rocky Smolin rockysmolin at bchacc.com
Mon Jul 31 22:45:19 CDT 2017


Bob:

Are you still interested in the sort-photos-by-date-and-rename program?  I
can send it to you with or without the phone consult.  Not the version that
I first posted but the one that really works off the photo taken date in the
jpg header.

Best,

R


-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob
Heygood
Sent: Thursday, July 27, 2017 7:42 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Access files by date

Great solution.
I have a need that this will work for as well.

Thx
Bob Heygood


-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Stuart McLachlan
Sent: Monday, July 24, 2017 1:10 AM
To: Access Developers discussion and problem solving
Cc: 'Off Topic'
Subject: Re: [AccessD] Access files by date

I'd create a table to store all the filenames and dates with whatever other
fields you need for new filenames, comments or whatever.  Then a simple
function:

Function GetPhotos() As Long
Dim strFName As String
Dim fdate As Date
Dim rs As DAO.Recordset
Dim lngCount As Long
Set rs = CurrentDb.OpenRecordset("tblPhotos")
strFilename = Dir$(CurrentProject.payh & "\*.jpg") While strFilename > ""
     rs.AddNew
     rs!FileName = strFilename
     rs!Filedate = fdate = FileDateTime(CurrentProject.Path & "\" &
strFilename)
     rs.Update
     lngCount = lngCount + 1
    strFilename = Dir$
Wend
rs.Close
Set re = Nothing
GetPhotos = lngCount
End Function

Once you have then in the table you can do anything you want with the data,
manually or with VBA.

On 23 Jul 2017 at 21:36, Rocky Smolin wrote:

> Dear List:
> 
> 
> 
> Having just returned from a 5 day 250 mile bike trek through the 
> redwoods of northern California with a group of 0 guys, I have 
> volunteered to assemble everyone's pictures and edit them down to a 
> director's cut.
> 
> 
> 
> What I have done after editing all their photos (and discarding many) 
> is put everyone's pictures in one folder which I can then display by 
> date.  Since everyone (hopefully) has a correct date time stamp, the 
> pictures of like places and times are now grouped together.
> 
> 
> 
> So now I would like to loop through these picture in date sequence, 
> and rename them RR00010, RR00020, RR0030, etc.  so I can then do a bit 
> of rearranging by changing file names. Once that's done I can do a 
> final cull of the pictures and, if I need to manually insert any in a 
> different place I can do it - like RR00025 would go between RR00020 
> and RR00030.
> 
> 
> 
> I'm having a little though, trouble extracting this solution from the 
> web. Can someone point me in the right direction?  Can this all be 
> done with FSO? My first attempt retrieved the pics in file name order, 
> not date/time order. And don't see a way using the Dir command to do 
> that.
> 
> 
> 
> MTIA
> 
> 
> 
> 
> 
> Rocky Smolin
> 
> Beach Access Software
> 
> 760-683-5777
> 
>  <http://www.bchacc.com> www.bchacc.com
> 
>  <http://www.e-z-mrp.com> www.e-z-mrp.com
> 
> Skype: rocky.smolin
> 
> 
> 
> 
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list