I have read several posts that have given examples of similar processes. I have put a lot of time trying to make this work so i would really like to get this to work so I can put all this time into the "I learned something Category" But if its just not possible... I guess I will learn that at least.
I am tring to copy all files from a folder to another folder using ssis 2008r2. -using execute process task -using C:\Windows\System32\cmd.exe in the executable field -the destination folder is a variable I want to create using the starttime variable - which is working -then i want to copy all the working files into that folder. -this dest folder uses the start time down to the second so i can capture each attempted run with minimal errors or overwrites
With so many attempts and failures i have dumbed it down to using straight string variables to try to just move all the files in the simplest way that still uses a variable. the variables I am currently using in my mutiple failed attempts are...
[user::testtofolder] = p:\Utilities\SWUMOps\Archive\20160720-0921-03-SAWSImports
[user::testtofolder1] = p:\\Utilities\\SWUMOps\\Archive\\20160720-0921-03-SAWSImports
[user::testtofolder2] = p:\\Utilities\\SWUMOps\\Archive\\20160720-0921-03-SAWSImports
The below are some of the attempts I have tried in the arguments field
/c copy /y p:\utilities\swumops\backend\saws p:\utilities\swumops\archive\20160720-0921-03-sawsimports -- works (no variables)
/c copy /y p:\utilities\swumops\backend\saws + @[user::testtofolder] -- fails
"/c copy /y \"p:\utilities\swumops\backend\saws\" + @[user::testtofolder] -- fails
"/c copy /y \"p:\utilities\swumops\backend\saws\"" + @[user::testtofolder] -- fails
"/c copy /y \"p:\utilities\swumops\backend\saws \"" + @[user::testtofolder] -- fails
"/c copy /y \"p:\\utilities\\swumops\\backend\\saws \"" + @[user::testtofolder] --fails
/c copy /y p:\\utilities\\swumops\\backend\\saws + @[user::testtofolder] --fails
"/c copy /y \"p:\\utilities\\swumops\\backend\\saws \" + @[user::testtofolder] --fails feel this is the closest
"/c copy /y \"p:\\utilities\\swumops\\backend\\saws \" + @[user::testtofolder1] -- fails
"/c copy /y \"p:\\utilities\\swumops\\backend\\saws \" + @[user::testtofolder2] -- fails
the frustration thing about this is I can't(don't know how to) see what is truly passed to cmd because the window flashes to fast and the errors only read the line that is in the argument field not the past string. the errors look like this...
Error: 0xC0029151 at Copy files to archive, Execute Process Task: In Executing "C:\Windows\System32\cmd.exe" ""/c copy /y \"p:\utilities\swumops\backend\saws \" + @[user::testtofolder]" at "", The process exit code was "1" while the expected was "0".
Hope I put enough details. Let me know if you need more. Thank you
"/c copy /y p:\utilities\swumops\backend\saws\ " + @[user::testtofolder]. Note the space between saws\ and the trailing quote - Nick.McDermaid