I didn’t know how to get the flags to work wit the copy command.
I'm able to accomplish what I need without the shell but just out of curiosity how would it work with only a single parameter? I searched and didn’t see any topics referencing shell and parameter usage.
Code:
for each $folder in folderlist('c:\data1')
copy 'c:\data1\'+$folder+'\data\netscape\*.*' 'c:\data1\'+$folder+'\data\netscape7\' /s /c /r
next
; UDF Function FolderList
Function FolderList($folderName,optional $mask)
dim $objDir, $objFld, $objFile, $t, $name
$objDir = CreateObject('Scripting.FileSystemObject')
if @error Exit 1 Endif
$objFld = $objDir.GetFolder($folderName).SubFolders
if @error exit 2 endif ; usually folder not found
For Each $objFile In $objFld
$name=$objFile.name
if ($mask and instr($name,$mask)) or not $mask
$t=$t+'|'+$name
endif
Next
$FolderList=split(substr($t,2),'|')
$objDir = 0
EndFunction