Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy Files

Status
Not open for further replies.

ajtsystems

IS-IT--Management
Jan 15, 2009
80
GB
Hi,
I have a script which puls info from WMI and creates an array with the returned information. The path information I am going to use to copy some remote files to but I need to exclude 1 particular file and copy the remaining files and folders. Here is my code so far:


Do Until objInFile.AtEndOfStream

strComputer = objInFile.Readline

Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")

Set objSWbemServices = objSWbemLocator.ConnectServer (strComputer, "root\WebAdministration", ms406)
objSWbemServices.Security_.authenticationLevel = 6
Set colitems = objSWbemServices.ExecQuery("Select physicalpath From virtualdirectory")

backupdir=InputBox("Backup Folder Path:","Backup Folder")


for each objapp in colitems

arrMem = array(objapp.physicalpath)

for i = 0 to UBound(arrMem)
call backup (arrmem(i), backupdir)
next


next
Loop


Can anyone point me in the right direction?
 
just delete the file you don't need?

the only thing that can't be patched is stupidity.
 
How are the files being backed up?
If it's using xcopy then you can use the switch /exclude:File1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top