I have a VB Script that cleans up various things on the C drives of servers. The only part I am having trouble with is cleaning the recycle bin. Here is the sub that I have that isn't working:
SUB Recycle (strComputer, StrDrive)
strDrive1 = Left(strDrive, 1)
Set FSO = CreateObject("Scripting.FileSystemObject")
sDirectoryPath = "\\" & strComputer & "\" & strDrive1 & "$\RECYCLER"
If Not FSO.FolderExists(sDirectoryPath) Then
sDirectoryPath = "\\" & strComputer & "\" & strDrive1 & "$\$Recycle.Bin"
Set objFolder = FSO.GetFolder(sDirectorypath)
CALL DeleteFiles (objFolder)
For Each objFile in objFolder.Files
For Each objSubFolder In objFolder.Subfolders
Maybe having two subs is creating the issue? Any help is appreciated.
Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over the limited options we had scripting in Task Scheduler 1.0. As I started my journey of knowledge I f…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space.
Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten.
The USB drive must be s…