+ Reply to Thread
Results 1 to 5 of 5

Add File Sizes for Files Found in a Specified Folder

  1. #1
    Forum Contributor
    Join Date
    07-28-2008
    Location
    Leamington Spa, UK
    MS-Off Ver
    2010
    Posts
    142

    Question Add File Sizes for Files Found in a Specified Folder

    Hi All,

    A long time back, with all your help I managed to get the below code working:

    What does the current code do?
    It searches a predefined folder for all files of a chosen file extension and lists them in column A at Time T=0. It then repeats the process leaving a gap of one row before re-lisiting the file names in the same folder again. This repetition is defined for every xxx sections up to yyy hours. At current for each block of file names found it lists the date and time found in columns B & C respectively on the first Row of the Search block.

    Additions I would like to have in the Code
    I would like the date and time to be listed along side every file name found for a given Time, not just the first of the file names.
    I would also like to introduce the File Size of each of the file names found in Column D of the spreadsheet.

    The Starting Code
    Please Login or Register  to view this content.
    The point of the spreadsheet is to gauge a Run process of a job I have running on my machine. I hope to do this by looking at the size of certain files with respect to time.

    Any help would be appreciated.
    Many Thanks, Mark
    Last edited by R_S_6; 05-12-2010 at 07:52 AM.

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Add File Sizes for Files Found in a Specified Folder

    Try with this macro:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Forum Contributor
    Join Date
    07-28-2008
    Location
    Leamington Spa, UK
    MS-Off Ver
    2010
    Posts
    142

    Question Re: Add File Sizes for Files Found in a Specified Folder

    Hi Antonio,

    That does exactly what I'm after. However it seems to fall over after the first list of file names and says 'Ambiguous name detected: Timer'??

    Any thoughts? It seems to appear when the 30 second interval is due to start again.

    Cheers in advance,
    Mark

  4. #4
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Add File Sizes for Files Found in a Specified Folder

    I think cuold be because macro is not in a module but in a sheet.
    If you have macro in a sheet change the row:
    Please Login or Register  to view this content.
    inserting sheet name as prefix so Excel understands where to look for the macro
    Please Login or Register  to view this content.
    Regards,
    Antonio

  5. #5
    Forum Contributor
    Join Date
    07-28-2008
    Location
    Leamington Spa, UK
    MS-Off Ver
    2010
    Posts
    142

    Re: Add File Sizes for Files Found in a Specified Folder

    Thanks Antonio - Works a treat with that mod! Thanks for your help!!

+ 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