On Error Resume Next Set objFSO = CreateObject("Scripting.FileSystemObject") '// Get Date in MMMDD format Ex: Feb29 :) a = Day(now) b = MonthName(Month(now), True) if a < 10 then a = "0"&a '// Declare all directory Variables Pub = "C:\Public\Florida" PubSo = Pub &"\Source" PubCF = Pub &"\Common files\"&b&a&"\" Common = "C:\Program Files\QuickQuote\Common Files\" Source = "C:\newqq95\allcomp" '// Delete the folder & Recreate objFSO.DeleteFolder(PubCF) objFSO.CreateFolder(PubCF) '// Copy all Files & Folders objFSO.CopyFile Common &"qqengine.exe" , PubCF , true objFSO.CopyFile Common &"WebxControl.ocx" , PubCF , true objFSO.CopyFile "C:\QuickFL\qqfl.mde" , PubCF , true objFSO.CopyFolder Common &"CompDll" , PubCF &"CompDll" , true objFSO.CopyFolder Common &"Compzips" , PubCF &"Compzips" , true '// Copy all .PAS Files that have changed in the last 5 days Set Fldr = objFSO.GetFolder(Source) For Each File In Fldr.Files If ((File.attributes = 32) and (UCase(objFSO.GetExtensionName(File)) = "PAS")) then If (now - File.DateLastModified < 5) then objFSO.CopyFile File , PubSo &"\" , true End If File.attributes = File.attributes - 32 End If Next '// Delete all folders in C:\Public\Florida\Common older than 5 days Set Fldr = objFSO.GetFolder(Pub&"\Common files") For Each Subfolder in Fldr.Subfolders If (Now - Subfolder.DateCreated > 5) Then Subfolder.Delete End IF Next