ForEach Loop, getting filename - help?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Using 2005, SSIS...

OK - I'm trying to loop through all the *.txt files in a certain
directory, and using each filename, call an executable, passing the
filename as an argument to the executable. I started by adding a
foreach loop container, and made sure it was foreach file enumerator
type. I chose the appropriate directory, and put in my *.txt filter,
and chose to use the fully qualified name. On the variable mappings
page, I created a new variabe (User::FileName), and saved it. Then I
added the execute process task inside the for each loop container,
calling the executable in the execute process task. I then chose the
User::FileName variable as the StandardInputVariable. And it won't
work. It can't find the filename at all. It does it 3 times (which is
the # of files) but it's not finding the filename.

What do I need to do in order to get the filename passed to the
executable???

.



Relevant Pages

  • Re: ForEach Loop, getting filename - help?
    ... I thought in the execute process ... In the empty double quotes above, there should be a filename, such as: ... page, I created a new variabe, and saved it. ... added the execute process task inside the for each loop container, ...
    (microsoft.public.sqlserver.dts)
  • Re: ForEach Loop, getting filename - help?
    ... filename as an argument to the executable. ... page, I created a new variabe, and saved it. ... calling the executable in the execute process task. ...
    (microsoft.public.sqlserver.dts)
  • Re: ForEach Loop, getting filename - help?
    ... Assign the result of the loop to a variable and then use that in you Execute Process task. ... In the empty double quotes above, there should be a filename, such ... mappings page, I created a new variabe, and saved ...
    (microsoft.public.sqlserver.dts)
  • Weird Error on this SP
    ... Iīve got the SP below that dinamically generates a filename to load its ... content into a table by using a bulk insert into a table. ... but if I execute only the SPīs content Itīs executed correctly. ... -- example to execute the store procedure ...
    (microsoft.public.sqlserver.programming)
  • Re: Regarding execute restore database in dts
    ... OK how do you intend to pass in the filename to the Global Variable? ... Once you have the filename in the variable you can use this article to execute it in an ExecuteSQL task ... database from that file. ... I can get that file name from globle variable then execute restoration ...
    (microsoft.public.sqlserver.dts)