Looking forward this useful script, you can display files detail with specific date criteria.
You can this script on Windows Server 2003
Just create bat file –> DisplayFile.bat
and the content of that file :
for help you can type this script on cmd prompt: forfiles /?
Format scripts
FORFILES [/p Path] [/s] [/d Date] [/m Mask] [/c Command] |
Path : Path to search (default=current folder) |
File Bat Contents
FORFILES /p D:\Folder2\ /m *.* /d -2 /c "cmd /c echo @FILE ################### @FDATE"
pause
if you want to delete file with date criteria, you can use this script
Delete file with batch command
FORFILES /p D:\Folder2\ /m *.* /s /d -2 /c "cmd /c echo del "@path" & del "@FILE"""
pause
Reference : http://ss64.com/nt/forfiles.html
No comments:
Post a Comment