Hi All,
I'm trying to create a batch file that will create a text file listing all the files within a folder that has been modified within the last 7 days, i thought this was going to be easy using some kind of switch that looks at the modified date but that doesn't seem to exist and i can't figure a way of doing it.
i have this script that will list files older than 7 days:
and this cmd that will list all my files in in date order (newest first):
But can't seem to get anything to list files modified within the last 7 days.
It would need to look in subdirectories too.
Any help would be greatly appreciated.
Regards,
JDobbsy1987
I'm trying to create a batch file that will create a text file listing all the files within a folder that has been modified within the last 7 days, i thought this was going to be easy using some kind of switch that looks at the modified date but that doesn't seem to exist and i can't figure a way of doing it.
i have this script that will list files older than 7 days:
Code:
forfiles -p c:\ /s /m *.* /d -7 /c "cmd /c echo @file > c:\users\jdobbsy1987\desktop\list.txt"
and this cmd that will list all my files in in date order (newest first):
Code:
dir /s /o:-d
But can't seem to get anything to list files modified within the last 7 days.
It would need to look in subdirectories too.
Any help would be greatly appreciated.
Regards,
JDobbsy1987
My Computer
- Computer type
- PC/Desktop
- Computer Manufacturer/Model Number
- Self Built
- OS
- Windows 8.1 Pro x64
- CPU
- Intel Core i5-2500K @ 3.30GHz - S1155
- Motherboard
- Asus P8P67 LE Rev3, Intel P67, S115
- Memory
- 8GB Corsair DDR3 XMS3, PC3-12800
- Graphics Card(s)
- NVIDIA GeForce GTX 650
- Sound Card
- On-Board
- Monitor(s) Displays
- 3 x 24" {Extended Display}
- Screen Resolution
- 1920 x 1080
- Hard Drives
- 300GB Seagate Barracuda 7200
- PSU
- 550W Coolermaster GX550
- Case
- Silverstone Precision PS04B
- Cooling
- Stock
- Keyboard
- Logitech K120
- Mouse
- World of Warcraft Cataclysm MMO Gaming Mouse
- Internet Speed
- 80 MB
- Antivirus
- MSE / Windows Defender
- Browser
- Chrome