I have a folder of about 130 files, and I want to use a CMD prompt to generate a single .txt file with all their names and last modified dates. I've looked into DIR and .LastWriteTime but I can't figure it out. All I've searched about this topic leads to using Powershell or Batch or Linux but I don't have any of these resources, only CMD. I'm new to using CMD, but the worst part is that I got this done about a month ago and I cannot remember how I got this done! Incredibly frustrating.
Thank you so much!
EDIT: In the off chance it helps, last time I used such command (which I forgot about, and for the life of me I seem not to be able to find again), it generated this following file, maybe this may serve as a visual cue of what's the command I'm talking about. Once again thanks!
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2/10/2018 3:55 PM 162256779 mobizen_20180210_155420.mp4
-a---- 2/10/2018 4:18 PM 111595959 mobizen_20180210_161816.mp4
-a---- 2/10/2018 4:20 PM 32643884 mobizen_20180210_162027.mp4
-a---- 7/15/2018 6:15 PM 60733357 mobizen_20180715_181514.mp4
-a---- 8/5/2018 5:08 PM 126381736 mobizen_20180805_170721.mp4
-a---- 8/30/2018 4:53 PM 81903211 mobizen_20180830_165306.mp4
CodePudding user response:
You can call powershell.exe
, the PowerShell
@echo Last Time written by me Length Name>mp4.log & echo ---- ---- ------- -- -- ------ ---->>mp4.log & dir /A:-D /O:D |find ".mp4" >> mp4.log & type mp4.log