Menu

I Need to Use "Modified Date" instead of "Created Date" when Filtering by Date

2019-12-09
2019-12-29
  • Donald Petersen

    Donald Petersen - 2019-12-09

    I need to filter 100,000 files located in 15,000 folders and select all files modified after a certain date.  It seems that SmartCopy uses the "Created Date" when filtering by date but I need to filter by "Modified Date".

    I recently recovered my data from Carbonite after my system became unbootable.  Unfortunately, the "path" I used to recover my data caused all files to come back with a "Created Date" of 11/20/2019 and a "Modified Date" of 11/18/2019.  Before I noticed this problem I had already begun using my system and modifying files.

    I have since recovered my data again from Carbonite.  This time the "Modified Date" seems correct but the "Created Date" is still bogus.

    I need to find and move all the files I modified (probably about 100 files) after the initial restore by filtering by "Modified Date".  Would it be possible for SmartCopy to let me choose the date to be used for filtering during startup?  The dates of interest are "Taken Date" (for images), Created Date" and "Modified Date".

    It would really be nice to be able to use one, two, or all three dates simultaneously in the selection logic but I suspect that would be a big change to the program.  I believe that I could solve my problem nicely if I could simply select which ONE date of the three dates to use this time.

    Thanks for considering this change.

     
  • Simon Booth

    Simon Booth - 2019-12-09

    Hi Donald, I had forgotten that SmartCopyTool even had filtering by date, to be honest :)

    I never used to trust the "modified" date in Windows, which is why I didn't use it in the tool at all - I think it has got more reliable over the years though. Seems to make sense for most files in my photo library anyway - arguably more sense than "Created On".

    I've extended the "filter by date" action to support modification dates as well as creation dates - you can use any combination of created/modified, before/after.

    e.g. setting filters to "modified before 2015-01-01" and "modified after 2015-12-31" would leave just files that were modified in 2015. If that seems backwards to you, you're not alone ¯_(ツ)_/¯

    "Taken date" would definitely be a bigger task, I would presumably have to look into the EXIF data of the files ... currently the tool never actually reads files themself, just the file system, so that would be a major change ... outside the scope of this tool, I think.

    You can download the new version from https://sourceforge.net/projects/smartcopytool/files/

    Hope it helps!

     

    Last edit: Simon Booth 2019-12-09
  • Donald Petersen

    Donald Petersen - 2019-12-10

    Thank you very much for your speedy turn-around time for my request. I think that this will meet my needs nicely.

     
  • Donald Petersen

    Donald Petersen - 2019-12-27

    Perhaps I am confused. For this example with date filtering, it seems to me that no files should be in the list. In fact, I can't seem to find any filtering specification that makes the list of files disappear.

     

    Last edit: Donald Petersen 2019-12-27
    • Simon Booth

      Simon Booth - 2019-12-28

      Ah, looking at the log messages in your screenshot I think I see what's happening... if the filters remove all files from the working path, meaning SmartCopy has nothing left to work with, it will prompt you for a new path (it does this whenever it has no files to work with, e.g. at startup).
      If you select the same directory again (which will be the default) it'll just rescan all the files you just removed with the filters, returning you right back to where you started :-)

       
  • Donald Petersen

    Donald Petersen - 2019-12-29

    Thanks. I see what you mean and I understand, Given that explaination I cn see that date filtering seem to be working as expected.

    However, now that I have focused on the log, I see that I'm being denied access to some (19) files. It seems to make no difference whether or not I run as an Administrator.

    Further more, I'm being denied access to:
    'C:\Users\dwpet\Documents\My Music' is denied.
    'C:\Users\dwpet\Documents\My Pictures' is denied.
    'C:\Users\dwpet\Documents\My Videos' is denied.

    It looks to me like Music, Pictures, and Videos are folders in C:\dwpet and they don't have "My" in their name. In other words I believe their names are:
    'C:\Users\dwpet\ Music'
    'C:\Users\dwpet\ Pictures'
    'C:\Users\dwpet\Videos'

    Attached is a file with 3 short logs. Any insight and/or suggestions?

     
  • Simon Booth

    Simon Booth - 2019-12-29

    Yep, none of those are real folders - if you look in Explorer you'll see that they all have a little arrow on the icon, and if you try to open them you'll get "access denied" as well.

    What they actually are is virtual links to directories that now exist elsewhere (in some form), for compatibility with some older software, e.g. "My Music" is just a link to the folder "Music" in the same directory.

    There's a good explanation from Microsoft MVP here (a rare event!):

    https://answers.microsoft.com/en-us/insider/forum/all/i-cant-edit-my-own-start-menu-due-to-access-denied/518ccd7e-6e63-4eac-9a43-6467f93b380e

    I'm not sure if there's a way to exclude junctions from directory traversal without doing extra OS calls to check every folder (which would be very slow). Probably best to just know they're there and ignore them :-)

     
  • Donald Petersen

    Donald Petersen - 2019-12-29

    Interesting.  

    I can't see the Junctions with File Explorer (for example I don't see 'C:\Users\dwpet\Documents\My Music'), but apparently SmartCopyTool can see them.

    However, SmartCopyTool seems to have no problem accessing 'C:\Users\dwpet\ Music' so I think I'm fine here.

    I believe I have discovered a problem with your date sorting.  When sorting on "Modified" you seem to be treating the date and time as a text field and sort "left to right".  Thus,  the collating sequence is:

    • all January dates (regardless of year)
    • all October dates
    • all November dates
    • all December dates
    • all February dates
    • all March dates
    • etc

    It would be MUCH better if they were treated as time and date stamps and sorted chronologically.

    I'm happy to report that the "Date" field is being sorted correctly (chronologically).

     
    • Simon Booth

      Simon Booth - 2019-12-29

      Thanks, good catch - I've uploaded a new version with the sorting fixed to use a timestamp comparison rather than a text comparison :-)

       
  • Donald Petersen

    Donald Petersen - 2019-12-29

    It took me a little time to pin down the date filtering criteria. To help make things clearer I would suggest the following wording:

    • Filter (eliminate) files created on or before:
    • Filter (eliminate) files created after:
    • Filter (eliminate) files modified on or before:
    • Filter (eliminate) files modified after:
     

    Last edit: Donald Petersen 2019-12-29

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.