8

I have a data capture computer that uses Windows. In one directory I have many files captured during an experiment at various times. There are several hundred. The windows File Explorer enables you to see the creation date and time of each file. I need this information. However, when I copy the files to another computer, for data analysis, the creation dates are lost. Can this be avoided?

What I would like to do is make a list of file names and creation dates in a spreadsheet or similar. I could then use this spreadsheet in my data analysis computer to recover the creation dates.

It seems you can't copy and paste the creation date. You can copy the file names (right click selection and use "copy as path") but not further information.

Is it possible to copy both the file name and the creation date? In particular is this possible without buying and installing special software?

Donald Duck
  • 2,473
  • 10
  • 29
  • 45
Hugh
  • 181
  • 1
  • 2
  • You could write a program that reads the dates and outputs them to a .csv file which you can open with Excel. – Donald Duck Sep 25 '22 at 16:25
  • 1
    Does this answer your question? [How to preserve file attributes when one copies files in Windows?](https://superuser.com/questions/146125/how-to-preserve-file-attributes-when-one-copies-files-in-windows) – Markus Meyer Sep 25 '22 at 16:25
  • @MarkusMeyer Your link suggests this is not possible. Is this confirmed anywhere? – Hugh Sep 25 '22 at 16:32
  • 1
    oh, I thought the accepted `robocopy` answers will preserve the attributes – Markus Meyer Sep 25 '22 at 16:35
  • 2
    Use the command `dir /t:c > C:/yer_fldr/files.txt`and you can restrict *dir* to specify a file type, exclude folders, check subfolders, etc. See `dir /?` for info. See also https://www.cyberithub.com/how-to-display-nth-column-file-output-using-windows-command-line/ to select columns. – DrMoishe Pippik Sep 25 '22 at 16:41
  • Why not put the creation timestamp in the files' names? Then they'll not get lost or separated... – Roger Lipscombe Sep 26 '22 at 10:18
  • Note that the windows creation and modification dates are not absolutely reliable, in particular depending upon how the files are created it can end up with the information for an existing file. – jmoreno Sep 26 '22 at 10:57
  • 1
    Not the OP's question, but this is a perfect example of a general phenomenon. Is there a name for it? There's some textual information on the screen — in this case, the column of file modification dates/times — but it is "for your eyes only", you cannot select it with the mouse, or copy it, or paste it elsewhere. It's extremely frustrating. – Steve Summit Sep 26 '22 at 21:00

2 Answers2

18

Use Powershell to export the file list and their creation times to a csv file, then you can import the file to Excel.

Get-ChildItem -Path "*.*" | Select Name, CreationTime | Export-Csv myfiles.csv
Reddy Lutonadio
  • 17,120
  • 4
  • 14
  • 35
0

Here's the non-PowerShell answer - you can get the creation date using the dir command in Command Prompt.

dir /tc >myfiles.txt

It's fixed-width rather than comma-delimited, but you can import it into your preferred spreadsheet application just the same.

benshepherd
  • 1,641
  • 1
  • 9
  • 19