Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Delete certain files in subfolders

$
0
0

Guys,

Need help creating a script that deletes certain pst files I created that are in certain subfolders. So far this is what I have. Thanks in advance.

Dim file
Dim oFSO


'ON ERROR RESUME NEXT
Set oFSO = CreateObject("Scripting.FileSystemObject")


Set file = CreateObject("Scripting.FileSystemObject")
file.DeleteFile("I:\PST Data\2012\*\Careers.pst"), DeleteReadOnly

The PST data folder has two subfolders within it. 2012 and 2013. Within each of these are Month folders such as December,October, etc. Need to be able to remove a certain set of PST files from each month folder.


Christopher


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>