View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Delete temp files


You say "of a certain type"... does that mean there are other files in the
directory that you do not want to delete? If so, do they have file
extensions on them or not?

--
Rick (MVP - Excel)


"Sam" wrote in message
...
I need a code that will delete all files in a directory that are of a
certain
type.

We have an issue with one of our servers whereby the temp files that are
created when an ".xls" file saves are not deleted when the file saves.
They
are named: "29D41410", "31138510", etc. and do not contain file
extensions.
Properties list the Type of file as "File". Our netword amins are stumped
but
until a solution is found, I would like to enter a code into the Workbook
Before_Close event to loop through all files in the directory and delete
these junk files.

Can anyone help?

Thanks,

Sam


 
ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.