DIR /B switch

  • Jeff, don't be so sure.

    It's MS Windows we're talking about here.

    Ever noticed Modified Date earlier than Created Date?

    I did. Not once, not twice.

    _____________
    Code for TallyGenerator

  • Sergiy (4/28/2016)


    Jeff, don't be so sure.

    It's MS Windows we're talking about here.

    Ever noticed Modified Date earlier than Created Date?

    I did. Not once, not twice.

    Understood. I did a test (before coffee earlier this morning) on a large file and, it may have been the lack of coffee, but the Modified Date appeared to be the same date as the CREATE DATE until the copy was complete, at which time it did exactly what you said and the Modified Date changed back to a datetime prior to the CREATE DATE.

    Right or wrong, though, I'm suggesting that NOT be the method to determine if a file is in use even by a COPY command. They need to do something similar to the code I posted (which doesn't change the modified date, BTW) to check if the file is in use, instead.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Understood, but for me, as long as create date from running DIR..... command equal to the timestamp from file name is equal means that file is not copied. When they don't match-file is being copied.

Viewing 3 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply