![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Greetings, I hope someone might be able to point me in the right direction on this one. I am new to this so....... here goes. I have a DTS ActiveX script that I would like to traverse through a series of subfolders and copy selected files, rename them and drop them in another directory. Secondly, I need to be able to run a DTS package against the files that were copied to the holding tank. The DTS package imports the contents of the files into a series of tables for further processing. Then the process would move to the next subfolder and repeat the process, and again, and again, until all folders haver been processed. I can't seem to find a solution, any ideas? ************************************************** Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder("\\fileserver\f$\UserDBs") For Each Folder In f.Subfolders path = "\\fileserver\f$\UserDBs\" & Folder.Name & "\" Set objContacts = fso.GetFile(path & "builder.dbf") objContacts.Copy "\\fileserver\f$\holdingtank\" & FolderName & "builderDBF.dbf", 1 Set objActivity = fso.GetFile(path & "builder.adb") objActivity.Copy "\\fileserver\f$\holdingtank\" & FolderName & "builderADB.dbf", 1 Set objListTable = fso.GetFile(path & "builder.ddb") objListTable.Copy "\\fileserver\f$\holdingtank\" & FolderName & "builderDDB.dbf", 1 Set objSales = fso.GetFile(path & "builder.sdb") objSales.Copy "\\fileserver\f$\holdingtank\" & FolderName & "builderSDB.dbf", 1 Set package = CreateObject("DTS.Package") package.LoadFromSQLServer "SQLRPTS", "", "","256",,,,"FillSalesOppsTMP" package.Execute package.Uninitialize() Set package = nothing Main = DTSTaskExecResult_Success Next ************************************************** ********* Sincerely, DragonLancer1970 Dallas, TX |
![]() |
| Thread Tools | |
| Display Modes | |
| |