+ Reply to Thread
Results 1 to 4 of 4

Detail of directory and subfolder files

  1. #1
    Forum Contributor
    Join Date
    07-17-2015
    Location
    Roanoke, Virginia
    MS-Off Ver
    2010
    Posts
    173

    Detail of directory and subfolder files

    I have a directory C:\Users\jamesw\Documents\Data
    Within the directory are sub folders that have sub folders... example C:\Users\jamesw\Documents\Data\166\2018\06\05

    I'm looking for a way to extract from the file properties the
    1. File's name:
    2. file's date created with time: (‎Tuesday, ‎June ‎05, ‎2018, ‏‎7:27:28 PM);
    3. and the file size: 814 KB (834,101 bytes)

    Any help gratefully appreciated

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    Re: Detail of directory and subfolder files

    Look at this vba. You can modify the second characteristic to meet your needs.
    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    07-17-2015
    Location
    Roanoke, Virginia
    MS-Off Ver
    2010
    Posts
    173

    Re: Detail of directory and subfolder files

    How can I get this to loop through sub folders? ie the subfolders go 5 deep C:\Users\jamesw\Documents\Data\166\2018\06\05

    All I get is:The files found in Data are: The files found have modified dates: The file Size is:


    Anyway to get the data off the properties Date created with time (not modified date)

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,887

    Re: Detail of directory and subfolder files

    for file creation date, look at this link and substitute the modified date as a appropriate.

    https://msdn.microsoft.com/en-us/vba...eated-property

    To loop through sub folders if they exist, then look at this link

    https://www.ozgrid.com/forum/forum/h...that-subfolder

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 09-18-2015, 03:20 AM
  2. [ask]run VBA to multi files in subfolder
    By qiyusi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-24-2015, 10:24 PM
  3. Macro to Move files from one directory to other directory
    By Shanthuday in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2013, 07:21 AM
  4. [SOLVED] Macro to create subfolder in Oultook & directory folder
    By twitch73 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-26-2012, 09:41 PM
  5. Replies: 2
    Last Post: 01-26-2012, 12:52 PM
  6. Reading in the files in a directory into an array, directory chosen by user
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-18-2011, 12:52 PM
  7. Files move to a subfolder
    By Jokacave in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-22-2010, 02:13 PM

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