CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2021
    Posts
    5

    Find all files from a certain date (younger than 30 days) in a directory which contai

    Hi Guys
    I can no longer work with the explorer search and I have no other help.
    There are over 1.5 million test reports in a network folder and sometimes I have to search for something.
    It takes 30 minutes for Windows to display all of the files.
    And 60-Min to sort them by date

    Is there a possibility with a VB6 command to create a directory content. only the most recently created reports <30 days?

    Thanks Erwin

  2. #2
    Join Date
    Nov 2018
    Posts
    120

    Re: Find all files from a certain date (younger than 30 days) in a directory which co

    > There are over 1.5 million test reports in a network folder
    That's 100 per day (aka once every 15 minutes), every day, for 40 years.
    How fast are these reports being generated?

    > only the most recently created reports <30 days?
    So of the 1.5 million, how many results satisfy that criteria?

    You're basically screwed if you have all the files in one directory.

    From a command line prompt, time how long this takes (note, you won't see anything on screen)
    Code:
    dir /b/s \\network\path\to\reports >nul:
    That will be about as close as it's possible to even fetch the most basic information across the network. Nothing you could write in any language would transform that time into anything vastly quicker.

    Try organising things into
    reports\199x
    reports\199x\1990\01 Jan 1990
    reports\199x\1990\12 Dec 1990

    ditto through to
    reports\199x\1999\12 Dec 1999

    Then start on
    reports\200x
    reports\200x\2000\01 Jan 1990
    reports\200x\2000\12 Dec 1990

    ditto through to
    reports\200x\2009\12 Dec 2009

    OK, maybe you'd like reports\current for this year (and maybe last year), but sooner or later, moving the increasingly historic stuff out of the way should be part of your monthly/quarterly routine.

  3. #3
    Join Date
    Jul 2021
    Posts
    5

    Re: Find all files from a certain date (younger than 30 days) in a directory which co

    Yes, it is actually like this:

    there are around 15 workplaces, electronic circuits are checked with software and these reports are saved in the network folder.
    I do not have the opportunity to prescribe something to the responsible engineer

    Some employees serve several workplaces, up to 5 stations in rotation.
    This sometimes creates uncertainties and we have to look in this folder,
    so we have to check the name and serial number of the report with the serial number of the circuit.

    Your suggestion would really be the best, we thought so too, but the engineer can or does not want to change that.

    All the test programs can only use one same folder for the output.
    The data (per day) in this folder are copied into the large collection folder every midnight.
    Of course we could easily copy the reports into the appropriate folder with a batch: xCopy "/ D: M-T-J".
    But as I already wrote, the engineer refuses and we have no rights to create a new directory with copies on the network and look there in smaller directories :-(

    But I have found a solution and would like to point it out here in case someone else runs into the same problem.

    After a very long and intensive search, I came across a new solution :-)
    I don't have to generate a list of all documents, I need a program that registers "changes" in the network folder
    and saves them in its own index for a maximum of 90 days.
    Obviously you can monitor Windows for this (changes) and only get the 5-30 accesses per minute displayed.

    And I have found a program which solves this very well and you can search / sort in its index by name or part of a file name and by date.
    wizfile.exe (Sorry for the advertising.)

    After coming across this new approach, this program got installed on a local PC and everyone is happy.
    I will consider this approach later and try to develop my own little program for it if possible with VB6

    Thanks for your Interest Erwin

  4. #4
    Join Date
    Jul 2021
    Posts
    5

    Re: Find all files from a certain date (younger than 30 days) in a directory which co

    test

    Replay

    erwin

  5. #5
    Join Date
    Jul 2021
    Posts
    5

    Re: Find all files from a certain date (younger than 30 days) in a directory which co

    Yes, it is actually like this: -O
    there are around 15 workplaces, electronic circuits are checked with software and these reports are saved in the network folder.
    I do not have the opportunity to prescribe something to the responsible engineer :-(
    Some employees serve several workplaces, up to 5 stations in rotation. This sometimes creates uncertainties and we have to look in this folder. and check the name and serial number of the report with the serial number of the circuit.

    Your suggestion would really be the best, we thought so too, but the engineer can or does not want to change that.
    The test programs can only use a fixed folder for the output.
    The data (per day) in this folder are copied into the large collection folder every midnight.
    Of course we could easily copy the reports into the appropriate folder with a batch: xCopy "/ D: M-T-J".
    But as I already wrote, the engineer refuses and we have no rights to create a new directory with copies on the network and look there in smaller directories :-(

  6. #6
    Join Date
    Jul 2021
    Posts
    5

    Re: Find all files from a certain date (younger than 30 days) in a directory which co

    But I have found a solution and would like to point it out here in case someone else runs into the same problem.

    After a very long and intensive search, I came across a new solution :-)
    I don't have to generate a list of all documents, I need a program that registers "changes" in the network folder and saves them in its own index for a maximum of 90 days.
    Obviously you can monitor Windows for this (changes) and only get the 5-30 accesses per minute displayed.

    And I have found a program which solves this very well and you can search / sort in its index by name or part of a file name and by date.
    wizfile.exe (Sorry for the advertising.)

    After coming across this new approach, this program got installed on a local PC and everyone is happy.
    I will consider this approach later and try to develop my own little program for it if possible with VB6

    Thanks for your interest Erwin

  7. #7
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,900

    Re: Find all files from a certain date (younger than 30 days) in a directory which co

    If you sort the directory in descending order, which takes 60 minutes you have said, then open the directory after adding more files, are you seeing the new files added to the top of the directory ?

    (On the basis that newly added files have the current date and time - Date Modified)

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured