dannymakie
Technical User
Script to find all instances of thunderbird address book file in users folder and overwrite from source. There seems to be a access denied on line 13 (If aItem.Name = "impab.mab", i have full rights and the script is running as myself.
Any IDeas?
Dim wshShell, fso, objDir
Set wshShell = WScript.CreateObject( "WScript.Shell" )
strDir = "C:\Users"
strSource = "%software%\tbcontacts\impab.mab"
Set fso = CreateObject("Scripting.FileSystemObject")
Set objDir = FSO.GetFolder(strDir)
getInfo(objDir)
Sub getInfo(pCurrentDir)
For Each aItem In pCurrentDir.Files
On Error Resume Next
If aItem.Name = "impab.mab" Then
wscript.Echo "Found " & aItem.Path
strTar = aItem.Path
fso.CopyFile strSource, strTar, True
'do file manip, copy delete here
End If
Next
For Each aItem In pCurrentDir.SubFolders
'wscript.Echo aItem.Path & " passing recursively"
getInfo(aItem)
Next
End Sub
Any IDeas?
Dim wshShell, fso, objDir
Set wshShell = WScript.CreateObject( "WScript.Shell" )
strDir = "C:\Users"
strSource = "%software%\tbcontacts\impab.mab"
Set fso = CreateObject("Scripting.FileSystemObject")
Set objDir = FSO.GetFolder(strDir)
getInfo(objDir)
Sub getInfo(pCurrentDir)
For Each aItem In pCurrentDir.Files
On Error Resume Next
If aItem.Name = "impab.mab" Then
wscript.Echo "Found " & aItem.Path
strTar = aItem.Path
fso.CopyFile strSource, strTar, True
'do file manip, copy delete here
End If
Next
For Each aItem In pCurrentDir.SubFolders
'wscript.Echo aItem.Path & " passing recursively"
getInfo(aItem)
Next
End Sub