April 9, 2020 at 2:44 pm
All,
Can anyone advise the correct way to put this expression together? I've tried a few combinations but each results in an error when I press OK. I don't think it's relevant but it's the "arguments" expression for an execute process task.
Thanks
April 9, 2020 at 2:53 pm
I just typed this in and it works fine, what error you getting?
(DT_WSTR,255)("e C:\\Users\\as1981\\Downloads\\stackoverflow\\0302020 StackOverflow\\") + (DT_WSTR,255)( @[User::Filename])
here is the result when i hit Evaluate Expression:
e C:\Users\as1981\Downloads\stackoverflow\0302020 StackOverflow\ThisisMyFilename.txt
April 9, 2020 at 3:05 pm
Both: Thanks for your help.
Thom A: Sorry I didn't think of pasting as text. I will do in future.
I've just compared AlphaTangoWhiskey's example against mine and found the issue. It was the missing double backslashes in the path. I hadn't noticed they were missing but also wasn't looking at the content of the string as I thought that wouldn't be evaluated until runtime.
Thanks
April 9, 2020 at 6:43 pm
Just a quick note - you may need to embed double-quotes into that string for it to work correctly. There is a space in the path and it will probably cause an issue with execute process task and the parameter.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
April 10, 2020 at 9:49 am
Thanks for the advice. You are correct I had to make further corrections. When I have access to the system again I'll post the final expression in case it helps anyone in the future
April 14, 2020 at 12:47 pm
In relation to my previous post here is the final expression:
"e \"C:\\Users\\username\\Downloads\\stackoverflow\\032020 StackOverflow\\" + (DT_WSTR,255)( @[User::FileName]) + "\""
Viewing 7 posts - 1 through 7 (of 7 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