Login | |
|
 |
Re: excluding directory - 10/1/2004 11:39:44 AM
|
|
 |
|
| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
One way is to do an instr, I have just thrown the instr line together so check the syntax to make sure it is correct. quote: Dim fso, f, f1, s, sf Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(folderspec) Set sf = f.SubFolders For Each f1 in sf If instr(lcase(f1.name),"test") = FALSE 'Do the copy Next
Or use xcopy with an exclude file quote: WshShell.Run "cmd /c c:\move d:\Move\ /e /c /y /exclude:c:\excludefile.txt",1,true
The exclude file would contain test and it should exclude any form of test, but I have not tested this.
|
|
| |
|
|
|
|
|