PC Review


Reply
Thread Tools Rate Thread

How can we Link to the Most Current .txt file in a folder

 
 
Brad
Guest
Posts: n/a
 
      28th Jan 2010
We have an existing system that creates a small transaction file (flat file)
daily with a date stamp in the file name. All of these files are stored in
one folder, one file per day.

We would like to read the contents of the newest version of this file via
Access 2007. We know how to link to a specific flat file with Access 2007.
What we cannot figure out is how to programmatically determine (in VBA) which
file is the “most current”. Is this possible?

Thanks

Brad_55

 
Reply With Quote
 
 
 
 
Jerry Whittle
Guest
Posts: n/a
 
      28th Jan 2010
In the same situation, I found it better to not attempt to hit a moving
target. In other words, have the other system create the file with the same
name every day. If you need to keep a copy of it, maybe the other system
could create two files daily: one 'plain' and the other with the date
timestamp.

A dozen donuts for the developers on the other system should do the trick!
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Brad" wrote:

> We have an existing system that creates a small transaction file (flat file)
> daily with a date stamp in the file name. All of these files are stored in
> one folder, one file per day.
>
> We would like to read the contents of the newest version of this file via
> Access 2007. We know how to link to a specific flat file with Access 2007.
> What we cannot figure out is how to programmatically determine (in VBA) which
> file is the “most current”. Is this possible?
>
> Thanks
>
> Brad_55
>

 
Reply With Quote
 
Brad
Guest
Posts: n/a
 
      28th Jan 2010
Jerry,

Thanks for the great idea!

We had not thought of this approach, but it seems like a really good one.

I am now off to the local donut shop :-)

Brad


"Jerry Whittle" wrote:

> In the same situation, I found it better to not attempt to hit a moving
> target. In other words, have the other system create the file with the same
> name every day. If you need to keep a copy of it, maybe the other system
> could create two files daily: one 'plain' and the other with the date
> timestamp.
>
> A dozen donuts for the developers on the other system should do the trick!
> --
> Jerry Whittle, Microsoft Access MVP
> Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
>
>
> "Brad" wrote:
>
> > We have an existing system that creates a small transaction file (flat file)
> > daily with a date stamp in the file name. All of these files are stored in
> > one folder, one file per day.
> >
> > We would like to read the contents of the newest version of this file via
> > Access 2007. We know how to link to a specific flat file with Access 2007.
> > What we cannot figure out is how to programmatically determine (in VBA) which
> > file is the “most current”. Is this possible?
> >
> > Thanks
> >
> > Brad_55
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Paste a file into a folder with the current dat casan.mike@gmail.com Microsoft Excel Programming 1 28th Oct 2008 04:47 PM
VBA: Open Most Current File In Specified Folder whicks Microsoft Excel Discussion 2 27th Jun 2008 08:38 PM
use current file and folder name mohavv Microsoft Excel Misc 1 19th Dec 2007 10:06 PM
Macro to open most current file in folder =?Utf-8?B?VGFzaGE=?= Microsoft Excel Misc 6 19th Jun 2007 03:36 PM
File/Folder security for current context Davie Microsoft ASP .NET 0 27th May 2006 09:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:37 PM.