我需要您的帮助如何排除给定文件夹的特定国家文件名。
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&嘛。我不想生成这些文件夹
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
请让我们知道如何做。
非常感谢您的帮助。
您的选项
- 使用获得记录集的SQL语句中的Where子句。
- 使用仪器(" | aa | bb | ... | zz |"," |"&amp; region&amp;" |")在乡村代码的白色或黑色列表上(???)。
- 使用字典和d。
cf在这里