+ Reply to Thread
Results 1 to 3 of 3

vba to return the files and date last accessed in a directory

  1. #1
    Valued Forum Contributor
    Join Date
    11-15-2007
    Location
    England
    MS-Off Ver
    Office Pro 2003 / 2010
    Posts
    423

    vba to return the files and date last accessed in a directory

    Hi,

    Is it possible to run a macro that will list the files in a specific directory and give the date last accessed?

    We are trying have a clear up of our main shared directory and something like this would be really useful.

    There are folders that have limited access so that would have to be taken into account and there would be more files than the avilable number of rows in Office Pro 2003, so it would need to spill onto several tabs.

    If this is possible does anyone have a macro that I could use?

    Many thanks

  2. #2
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: vba to return the files and date last accessed in a directory

    One way - probably the easiest and fastest - is with the DOS DIR command. Open a command window and enter something like:

    DIR X:\Folder\Subfolder /S /OD /TA > dir.txt

    followed by:

    notepad dir.txt
    Post responsibly. Search for excelforum.com

  3. #3
    Valued Forum Contributor
    Join Date
    11-15-2007
    Location
    England
    MS-Off Ver
    Office Pro 2003 / 2010
    Posts
    423

    Re: vba to return the files and date last accessed in a directory

    Thanks Chippy.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1