This may be easy but it's driving me nuts (2 whole hours spent already! I've tried dozens of things!).
I just need a single line bat script that reads a given file's creation date and writes it to a text file.
I've tried using the dir /T:C
command, but it writes way too much info. For example:
dir /T:C "E:\TEST\test.mkv" >"E:\TEST\test.txt"
Writes this in the text.txt
file:
Le volume dans le lecteur E s'appelle xxxxxxxx
Le numéro de série du volume est xxxxxxxx
Répertoire de E:\TEST
11/03/2018 20:45 1 947 028 131 test.mkv
1 fichier(s) 1 947 028 131 octets
0 Rép(s) 64 368 631 808 octets libres
And I'm only interested in the "11/03/2018 20:45" part.
EDIT: I could also settle for the previous dir /T:C syntax if we could add a bit of code to keep only line #6 of the output and write it to the same text file.