Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Delete files older than a certain date (http://forums.winamp.com/showthread.php?t=295650)

jrhutch 7th August 2008 19:25

Delete files older than a certain date
 
As part of our install process, we have a utility that backs up our database info, and some report files. When installing our new product, we only need to keep report files that are less than a year old, and removing the older files speeds up our install significantly.

Is there a way to delete files out of a directory based on a wildcard search, and could they be searched quickly using their creation dates?

Comperio 7th August 2008 21:28

I think you should be able to use the Locate macro. This same documentation is also included in your NSIS help file.

jrhutch 8th August 2008 15:07

But locate can only really find files based on their existence or size.

Would you suggest trying to use something like the Time plugin in the callback function? That would mean the callback would be used on every file, and that seems pretty inefficient.

Yathosho 8th August 2008 15:20

a Locate / GetTime combo should do it


All times are GMT. The time now is 17:37.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.