August 7, 2018 at 8:08 am
Hello everyone
I use this little script to test if my file existspublic void Main()
{ string filelocation = @"c:\source\production.txt";
if (File.Exists(filelocation) == true)
{ Dts.Variables["FileExits"].Value = true; }
else { Dts.Variables["FileExits"].Value = false; }
Dts.TaskResult = (int)ScriptResults.Success; }
now I want to change it to test the file with a name that varies
thank you for your help
August 7, 2018 at 12:54 pm
joujousagem2006 1602 - Tuesday, August 7, 2018 8:08 AMHello everyoneI use this little script to test if my file exists
public void Main()
{ string filelocation = @"c:\source\production.txt";
if (File.Exists(filelocation) == true)
{ Dts.Variables["FileExits"].Value = true; }
else { Dts.Variables["FileExits"].Value = false; }
Dts.TaskResult = (int)ScriptResults.Success; }
now I want to change it to test the file with a name that varies
thank you for your help
Change the hard coded value to use a package variable, and properly populate that value outisde of the script task, and prior to it's execution.
Steve (aka sgmunson)
Rent Servers for Income (picks and shovels strategy)
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy