4

Couple of things to make note of.

Powershell is in unrestricted mode so adding ExecutionPolicy bypass is not needed. Runs successfully when i hard code the variable filename and then set up argument below in Execute Process Task.

@[User::Script_url] + " " + @[User::filename] 

But once I place that Execute Process task in Foreach loop container, to feed a different filename, nothing happens except the powershell opens and then closes quickly for the number of files in that directory...which suggests it is feeding the variable to the parameter but not actually executing the powershell script with each filename.

1
  • Use 4 spaces to format code Commented Jan 4, 2018 at 20:21

1 Answer 1

1

Check the variable mapping Tab in the foreach loop, it looks like you didn't mapped your variables correctly. Also make sure that you are not selecting the Fully qualified option in retrieve file name Group box. because the expression you are using @[User::Script_url] + " " + @[User::filename] need only to retrieve the Name and extension

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

@missy if this answer solved your issue, you have to accept it, just click on the mark below the voting arrows meta.stackexchange.com/questions/5234/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.