code to get file attributes

  • Follow


Am looking for some code (would prefer API calls over FileSystem object) to 
allow me to get the size, date created, data modified, and any other 
available attributes for a file that I know name and path of.

Anybody know where I can find some examples?
----
Dale

0
Reply Utf 12/4/2009 5:19:01 PM

"Dale Fye" <dale.fye@nospam.com> wrote in message 
news:BABBE503-E044-4224-8E6C-DAB73C9B578C@microsoft.com...
> Am looking for some code (would prefer API calls over FileSystem object) 
> to
> allow me to get the size, date created, data modified, and any other
> available attributes for a file that I know name and path of.
>
> Anybody know where I can find some examples?
> ----
> Dale

You can get/set a file's three dates using this:

http://www.smccall.demon.co.uk/MiscApi.htm#FileDateTime

For the rest, look up GetAttr and SetAttr in help.


0
Reply Stuart 12/4/2009 5:57:20 PM


Depending on what you are after, take a look at

getattr
filelen
filedatetime

in the help.  Or for API see

http://www.codeguru.com/forum/showthread.php?t=372929
-- 
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



"Dale Fye" wrote:

> Am looking for some code (would prefer API calls over FileSystem object) to 
> allow me to get the size, date created, data modified, and any other 
> available attributes for a file that I know name and path of.
> 
> Anybody know where I can find some examples?
> ----
> Dale
> 
0
Reply Utf 12/4/2009 6:25:01 PM

Daniel,

That worked great.  Thanks.

----
HTH
Dale



"Daniel Pineault" wrote:

> Depending on what you are after, take a look at
> 
> getattr
> filelen
> filedatetime
> 
> in the help.  Or for API see
> 
> http://www.codeguru.com/forum/showthread.php?t=372929
> -- 
> Hope this helps,
> 
> Daniel Pineault
> http://www.cardaconsultants.com/
> For Access Tips and Examples: http://www.devhut.net
> Please rate this post using the vote buttons if it was helpful.
> 
> 
> 
> "Dale Fye" wrote:
> 
> > Am looking for some code (would prefer API calls over FileSystem object) to 
> > allow me to get the size, date created, data modified, and any other 
> > available attributes for a file that I know name and path of.
> > 
> > Anybody know where I can find some examples?
> > ----
> > Dale
> > 
0
Reply Utf 12/4/2009 8:41:01 PM

3 Replies
447 Views

(page loaded in 0.139 seconds)


Reply: