![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2005
Posts: 3
Rep Power: 0
![]() |
Delete File Before a Certain date
Is there any way to obtain the creation date of a file.
I am aiming to automate the deletion of files that were created before a certain date. Is this possible? Any help would be greatly appreciated |
|
|
|
|
|
#2 |
|
Programmer
|
depend on your OS,you can use API on windows or SystemCall on Linux.I just know there is ,don't know what is.
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Nov 2005
Posts: 3
Rep Power: 0
![]() |
Having just posted the question I realised that a few technical details may be of use:
The script is written in a .bat file (windows scripting) and run a Windows 2000 machine ![]() |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4
![]() |
Note: UNIX does NOT keep creation times for files.
http://heanet.dl.sourceforge.net/sou...-2.5-1-bin.zip is the location for stat.exe for Windows. This gives you file time information. There is no windows command line utility that gives you all the file information stat.exe can give. Anyway, it's a start, but I don't see how you are going to write a DOS batch script that will identify files older than a certain date relative to today's date. For example: files older than 30 days. Play with stat.exe and see if it can help you. |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Nov 2005
Posts: 3
Rep Power: 0
![]() |
Thanks for the link. Just "installed" it and had a play it looks good.
Thanks Again ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|