Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
igorblackbelt
Constraint Violating Yak Guru
407 Posts |
Posted - 2008-01-14 : 09:52:25
|
I'm trying to read the filename from a file that I'm downloading by FTP (FTP Component) into a string variable so I can later use it for another part of the process, how can I do this? |
|
rohitkumar
Constraint Violating Yak Guru
472 Posts |
Posted - 2008-01-14 : 16:34:58
|
activex / fso? |
|
|
rgombina
Constraint Violating Yak Guru
319 Posts |
Posted - 2008-01-16 : 08:02:40
|
Possible solution -1) Create Variable name: strFileName2) Foreach Loop: Foreach File EnumeratorVariable Mappings: Variable = User::strFileName, Index=03) Test...Script Task: Script ReadOnlyVariables = strFileName... Public Sub Main() MsgBox("Filename: " & Dts.Variables("strFileName").Value.ToString) Dts.TaskResult = Dts.Results.Success End SubIf successful you can call variable from anywhere (make sure variable is at the parent level)Good luck! |
|
|
|
|
|