I need a script which can delete all files which are older than a day and this script needs to be invoked every day automatically in the Sharepoint server. How can i do this and any hints as how to write the script?
I think an easier way to do it would be to create a site collection policy with an expiration. Set the retention period for one day. You can then attach the disposition workflow to your list which acn be used to clean these files up. You should be able to do all of this without writing any code.
Here is a link with more information about disposition workflow. http://office.microsoft.com/en-us/sharepointserver/HA101544291033.aspx
Thanks, Corey