Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute Process with dynamic parameter

Status
Not open for further replies.

rac2

Programmer
Apr 26, 2001
1,871
US
How to specify a parameter for an Execute Process Task that takes its value from a global variable?

I wish to run a batch command with a filename as an argument. The filename is generated by a date query in a global variable. The global variable is used for the data source. After the file is processed I wish to move it to an archive folder.

The Execute Process Task looks like it could do that if only I could provide the name of the file for today. At the moment I have a constant parameter, orders????????.txt, which will move any and all order files with names like orders20080521.txt, orders20080522.txt, etc. But I would like to make it specific to the file for today.

I am using SQL Server 2000.
 
could you use another gv, containing the date, and then use both?

I've never used the Execute Process task before, but depending on the file system you may be able to do this more efficiently through a script task.

But mostly, it sounds like you are trying to loop over a collection of files and do something with each one. This will show you exactly how to do it:
Hope this help,

ALex


[small]----signature below----[/small]
Majority rule don't work in mental institutions

My Crummy Web Page
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top