How to delete .tmp files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm rather new to C# and have a requirement to write a Console Application
that will scan the drives on a file server and delete all the .tmp files.
Could someone point me in the right direction to get started. I'm think I
need to use the System.Management class.

Thanks.
 
Use the GetDirectories method recursively and perform a GetFiles method
with a *.tmp parameter for each directory scanned.

Best Regards
Johann Blake
 
Back
Top