我需要您的帮助,如何排除给定文件夹的特定国家/地区文件名。
DIM datasource
datasource = objRs.Fields(0).Value
Region = replace(objRs.Fields(1).Value," ","_",1,-1,0)
CountryCode = Region &"_"& serialNumber1
'-----------------------------------------------------------------
'Region subfolder creation
packageCountryDataPath = outputfolder&"\"& Region
If Not fso.FolderExists(packageCountryDataPath) Then
fso.CreateFolder(packageCountryDataPath)
WScript.Echo "Regions Folders created: " & Region & ""
End If
我想只排除像UN& amp;这样的特定国家/地区文件夹。嘛。我不想生成这些文件夹
Do Until objRs.EOF
datasource = objRs.Fields(0).Value
WScript.Echo datasource
Region = replace(objRs.Fields(1).Value," ","_",1,-1,0)
CountryCode = Region &"_"& serialNumber1
'-----------------------------------------------------------------
'Region subfolder creation
packageCountryDataPath = outputfolder&"\"& Region
If Not fso.FolderExists(packageCountryDataPath) Then
fso.CreateFolder(packageCountryDataPath)
WScript.Echo "Regions Folders created: " & Region & ""
End If
WScript.Echo "Regions Folders created: " & packageCountryDataPath & ""
Set folder = fso.GetFolder(Inputfile)
Set files = folder.Files
For each item In files
If Instr(item.Path,".xml") <> 0 then
logfilename =item.Name
logfilename= replace(logfilename,".xml","",1,-1,0)
returnValue = exportDatasource(item.Path,logfolder&"\"& logfilename &".log", datasource, CountryCode, DateTime, utilsfolder, packageCountryDataPath, dbDataSource, dbLogin, dbPassword)
If returnValue = 0 Then
'WScript.Echo "Datasource " & Region & " processed"
Else
WScript.Echo "Error while processing Datasource " & Region
Exit Do
End If
End If
请告诉我们如何做到这一点。
非常感谢你的帮助。