I have a Foreach File Enumerator that loops through all files in a folder, saving the directory and file name to a variable @NextFile.
Inside the Foreach, I have an Execute Process Task which is passed the variable @NextFile.
I pass the variable by selecting Edit on the Execute Task, Expressions->Arguments->@[User::NextFile].
This works fine if the file name has no spaces, but when there is a space, the String passed in will end where the first space appears.
Eg: if the directory name is c:\files\file a.pdf, the variable will be c:\files\file
I've tried to enclose NextFile in quotes "@[User::NextFile]" but then the variable is set to "@[User::NextFile]"
Make your expression look like:
"\"" + @[User::Filename] + "\""

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With