Windows 10: Need to read the file modification/creation date & time of UDF file system

Discus and support Need to read the file modification/creation date & time of UDF file system in Windows 10 Network and Sharing to solve the problem; I have some DVDs with loads of pictures and I want to be able to get a list of file names, dates & times using C or C++ API calls. Apparently the DVD... Discussion in 'Windows 10 Network and Sharing' started by miniTester, Apr 13, 2020.

  1. Need to read the file modification/creation date & time of UDF file system


    I have some DVDs with loads of pictures and I want to be able to get a list of file names, dates & times using C or C++ API calls.

    Apparently the DVD is written using the UDF file system and even the Win 10 File Explorer does not show the data & time.

    1 why does Win 10 not display the UDF times

    2 what library or API calls will allow me to read that information

    Running the latest Win 10 update & trying to use MSVC 2019

    :)
     
    miniTester, Apr 13, 2020
    #1
  2. WernerGg Win User

    Wrong file modification dates/times

    Thanks Brian for your interest in that issue with file dates. I wonder why this is not heavily discussed in the community.



    At least we agree for the backup case. If a sync program is similar to a backup program or not is a philosophic question which I would like to avoid. But I think at the end a synchronization should lead to a "similar" state in both synchronized data sets.
    And for me the modification date of a file is an essential information that is part of a files identity. Hence a synchronization should not change it. This is philosophy again. You certainly know these OO discussions about "identity" of objects.

    But leave aside all philosophy. At the end ActiveSync produces the current date as file (modify-) date for all (!) files on the mobiles My Documents, even those that have not been changed since months or years. And this is certainly not a desirable behaviour.

    One reason for that is ActiveSyncs Copy behaviour. An other seems to be its handling of archive bits. I will write on this in a later article.

    I do not agree to that. And Microsoft doesn't either as I will show.

    I agree to that. But this is another question and not relevant for file synchronization. I did not carefully examine how ActiveSync handles directory dates. The file case causes work enough for me.

    How do Windows Mobile and Windows PC handle file dates during copy operations? I made experiments for creation date and modification date. I left aside last-access dates. They seem not being really supported on Windows Mobile and they are not really interesting
    for the user. The creation date is normally not very important as well. What the user needs all day is the modification date. Often this is just named "file date" as a synonym.

    ----------------------

    The following is done completely on a standalone mobile device with WM6.1 not attached to the PC. No ActiveSync interaction.

    Say you have a file in Directory A.

    Created at 07:32, last edited at 08:25.

    ==> in DirA:

    Create Time: 07:32

    Modify Time: 08:25

    1) At 08:30 copy it for the first time to Directory B. It did not exist in DirB.

    ==> in DirB:

    Create Time: 07:32

    Modify Time: 08:25

    +++ Both times are unchanged by copy which is reasonable.

    +++ But I would agree if both times were 08:30

    2) At 08:44 edit the file in DirB

    ==> in DirB:

    Create Time: 07:32

    Modify Time: 08:44

    +++ The file gets the new modified time

    3) At 08:47 copy it back to DirA. Confirm to overwrite the file.

    ==> in DirA:

    Create Time: 07:32

    Modify Time: 08:44

    +++ The create time is not changed from its former value in DirA. As a result of Step 1) this is equal to the create time in DirB.

    +++ The modify time is unchanged (!) which is reasonable.

    ... and so on

    If you do the same on a PC with Windows XP you will see:

    Windows on the PC shows exactly the same behaviour concerning the modification date.

    But - strange enough - it is different concerning the creation date during first copy.

    After Step 1) when you first copy a file the target file will have:

    ==> in DirB:

    Create Time: 08:30

    Modify Time: 08:25

    +++ The modify time is unchanged by copy which is reasonable.

    +++ The create time is changed to time of copy.

    ??? This is a bit strange, because the file was now modified before (!) being created.

    +++ But why not?

    Steps 2) and 3) behave equal as on the mobile.

    The file in DirA keeps its original create date and inherits the modify date from the copy source in DirB.

    ----------------------

    To summarize:

    +++ COPY operations do not change modification dates.

    At least on Windows operating systems. Which is a reasonable behaviour.

    ??? Initial COPY operations (target does not exist) do change the creation date on Windows, but not on Windows Mobile. Which is a strange idea of the Microsoft programmers/designers.

    +++ Later COPY operations (target does already exist) do not change the creation or modification dates.

    At least on Windows operating systems. Which is a reasonable behaviour.

    --- ActiveSync however always changes the modification date to the current date during each copy caused by a synchronization.

    Which I consider an ActiveSync bug or design defect respectively.



    Werner Geiger, IT-Architect
     
    WernerGg, Apr 13, 2020
    #2
  3. More about file Creation and Modification File Dates

    When a document is copied to a new location, the mod and creation date are changed to the date of the copy. But with picture and video files, these always also retain the original creation date regardless of how many times they were copied or edited.
    Why can’t something like this be implemented for other file types?



    But the system is what it is. For those of you who need to know the actual date a file was created and/or modified, how do you keep track of this? Some files, like PDF’s also retain this data which can be viewed from within Acrobat or the Reader, but
    most other files just rely on Window’s properties. Any suggestions?
     
    LonWinters, Apr 13, 2020
    #3
  4. WernerGg Win User

    Need to read the file modification/creation date & time of UDF file system

    Wrong file modification dates/times

    I use ActiveSync 4.5 to synchronize my Mobile WM6.1 with my PC WinXP, SP3. I synchronize Office items and files.

    ActiveSync

    • owerwrites file dates (modified date to be specific) with current transmission date
    • sometimes resyncs all files with no understandable reason and then changes all file dates to current date.
    I know this is a known issue but I could not find any reasonable answer on that nasty behaviour. ActiveSync should synchronize files and not spoil them.

    Does anybody know exactly how ActiceSync works?

    For reproduction of the problem I made an experiment. Protocol follows. Issues that are ok are marked with "+++". Issues that are bugs in my opinion are marked with "---"

    ----------------------------------------------------------------------------

    File created on Mobile, later edited,

    Not attached to PC

    ==> On Mobile:

    Create Time: 17:32

    Modify Time: 17:37

    (Note: I have a tool "TreeSize Mobile" that is able to show creation, change and last access date on WM)

    Now USB cable attached.

    ActiveSync syncs the file to the PC

    ==> On PC:

    Create Time: 17:40

    Modify Time: 17:40

    --- This is wrong. Time of transmission, not file dates.

    +++ But maybe ok because the file is really created on the PC at this time.

    ==> On Mobile:

    Create Time: 17:32

    Modify Time: 17:37

    +++ This is still unchanged and correct

    Even after following runs of ActveSync from other reasons these dates stay unaltered since the file is not transferred again.

    +++ This is correct but strange, because the file on the PC is newer than on the mobile.

    --- Bug or feature?

    Now the File is edited on the PC.

    The Mobile is still attached.

    Immediately after save of the file:

    ==> On PC:

    Create Time: 17:40

    Modify Time: 18:12

    A short time later the file is transferred to the Mobile.

    And back again!

    --- Why back again?

    ==> On Mobile:

    Create Time: 17:32

    Modify Time: 18:13

    --- This is wrong. Time of transmission, not file date.

    ==> On PC:

    Create Time: 17:40

    Modify Time: 18:13

    --- This is wrong. Time of transmission, not file date.

    ----------------------------------------------------------------------------

    I cannot reproduce the case when ActiveSyncs resynchronizes all (!) files. But when it happens then all file modification dates on both ends are wrong, namely current transmission date. Creation dates sometimes survive, sometimes not.

    All in all: Never use file dates on your Mobile. They are totally unreliable.
     
    WernerGg, Apr 13, 2020
    #4
Thema:

Need to read the file modification/creation date & time of UDF file system

Loading...
  1. Need to read the file modification/creation date & time of UDF file system - Similar Threads - Need read file

  2. If you make modifications and save the file after the program opens it, the creation date...

    in Windows 10 Network and Sharing
    If you make modifications and save the file after the program opens it, the creation date...: Windows 10 Home Version : 21H2Translated EnglishNormally, when I open a file in the program, edit it and save it, the file's creation date remains the same, and only the modified date and accessed date change. However, a problem occurred after I bought an NVME SSD for storage...
  3. Creation date of a file

    in Windows 10 Network and Sharing
    Creation date of a file: I rename in PowerShell an existing file from Syslog.log to SyslogBack.log. The creation date of SyslogBack.log is inherited from Syslog.log which is OK.Now I create a new Syslog.log using the PowerShell cmdlet Add-content.It turns out that Windows did not forget about the...
  4. Creation date of a file

    in Windows 10 Gaming
    Creation date of a file: I rename in PowerShell an existing file from Syslog.log to SyslogBack.log. The creation date of SyslogBack.log is inherited from Syslog.log which is OK.Now I create a new Syslog.log using the PowerShell cmdlet Add-content.It turns out that Windows did not forget about the...
  5. Creation date of a file

    in Windows 10 Software and Apps
    Creation date of a file: I rename in PowerShell an existing file from Syslog.log to SyslogBack.log. The creation date of SyslogBack.log is inherited from Syslog.log which is OK.Now I create a new Syslog.log using the PowerShell cmdlet Add-content.It turns out that Windows did not forget about the...
  6. File Explorer is not reading CD/DVD: files/content invisible UDF file system

    in Windows 10 Drivers and Hardware
    File Explorer is not reading CD/DVD: files/content invisible UDF file system: The File Explorer on my computer is not reading the files on my DVD/CD-ROM. The DVD/CD-ROM drive is working fine. Other CDs work ok. This CD, there are no files listed, shows "0 items". Right click on properties show file system is UDF and about 28MB used space. Right...
  7. Cannot read UDF file with Win dvd

    in Windows 10 Drivers and Hardware
    Cannot read UDF file with Win dvd: DVD media player not working properly distorted pictere https://answers.microsoft.com/en-us/windows/forum/all/cannot-read-udf-file-with-win-dvd/895ee8fb-2e16-4a43-90d6-fe1c7d93b3bd
  8. Files Creation Date

    in Windows 10 Support
    Files Creation Date: Helllo, I have several folders with important documents, letters, notes etc. To keep then safe I just copied the several folders to another location (another disc) in the computer. Noticed that all files in the new location got current date as creation date, not as the...
  9. OneDrive file modification dates

    in Windows 10 Network and Sharing
    OneDrive file modification dates: When I modify a file in my desktop OneDrive folder, and upload it to my mobile OneDrive folder, the date does not match the modified date from my desktop. It could have a date that's months old. This creates doubt whether the mobile file has all the current changes, so if I...
  10. File creation date is changed

    in Windows 10 Network and Sharing
    File creation date is changed: The date and time on my Surface Book Pro Windows 10 is correct. But if a create a new file, the date is wrong https://answers.microsoft.com/en-us/windows/forum/all/file-creation-date-is-changed/486fc3cc-7ace-4dca-8dd7-ba03bd9c631b"