This VB Script might help you. Sorry, I couldn't take the time to dive
into the transformations and search the ActiveX Transforms, but hopefully
this will find all the instances in your ActiveX tasks.
Copy this into a .vbs file saved in the same directory as your dts files.
Run from a command prompt like:
wscript [GivenFileName] [search string]
or doubleclick in windows Explorer.
Best of luck!
' Script to search ActiveXTasks for a given string
set fso=createobject("scripting.filesystemobject")
set rootfolder=fso.getfolder(".")
if wscript.arguments.count>0 then
FindString=wscript.arguments(0)
else
findstring=inputbox("Enter the word to find in all DTS packages")
end if
for each f in rootfolder.files
set d=createobject("dts.package")
if lcase(right(f.name,4))=".dts" then
d.LoadFromStorageFile f.name, ""
For Each t In d.Tasks
If t.CustomTaskID = "DTSActiveScriptTask" Then
scr=t.CustomTask.Properties.Item("ActiveXScript"). Value
if instr(lcase(scr),lcase(findstring)) then
msg=msg & "File: " & f.name & vbcrlf
msg=msg & "Task: " & t.name & vbcrlf
msg=msg & vbcrlf
end if
End If
Next
end if
set d=nothing
next
msg="Search found:" & msg
wscript.echo msg
"BEN" <blair.nicolle (AT) gmo (DOT) com> wrote in news:16ed01c4b55c$4c209940
$a301280a (AT) phx (DOT) gbl:
Quote:
I have a large library of DTS packages (as *.dts files) in
a folder.
I'm trying to determine which of the "n" files in the
folder reference a line of ActiveX code or variable.
Clearly, I cant do a search thru Windows as the DTS
packages are encrypted. But, does Enterprise Manager have
some utility which could do this search? Otherwise, I
need to open "n" files with "m" ActiveX scripts and it
will take forever (m*n > moreTimeThanIhave). |