how to exclude files and folders
using XP system.
************************************************** **********
Dim objNetwork,FSO,net,Wshnetwork
Dim strDriveLetter, strRemotePath, strUser, strPassword, strProfile
strDriveLetter = "Z:"
Set objNetwork = WScript.CreateObject("WScript.Network")
objnetwork.MapNetworkDrive "Z:","\\IPADRESS\c$","True","username","passwo rd"
set fso = wscript.CreateObject("Scripting.FileSystemObject")
set folder = fso.GetFolder ("Z:\xyz")
'exclude txt files
for each file in folder.Files
if fso.GetExtensionName (file.Path) = ".txt" then
WScript.Echo file.Path & " excluded"
end if
FSO.Copyfile "Z:\xyz\*.*", "c:\abc\"
'exclude test.txt file
if file.Name = "*.txt" then
WScript.Echo file.Path & " excluded"
end if
next
objnetwork.RemoveNetworkDrive "Z:"
WScript.Echo " Drive Closed:: check: "
************************************************** ********
"asdf" wrote:
|