Problems with process task (arguments with variables)

  • Hi, I have a process task. I execute a jar:

    Name1 = c:\helical.asc

    Name2 = c:\files

    Name3 = hello

    java -jar nombrejar.jar -d + @[User::Name1] + @[User::Name2]+ @[User::Name3]

    My problem is when some parameter have a name with spaces, my task failure. e.g:

    Name1 = c:\test file\test 1\helical.asc

    If you write the argument:

    "java -jar nombrejar.jar -d" +" " + "''" + @[User::Name1] + "''"+" " + "''" + @[User::Name2] + "''" +" " + "''" + @[User::Name3]+ "''"

    , my task failure.

    How can i write my variables and these are ok?

    thanks

  • Helical Johan (12/17/2009)


    Hi, I have a process task. I execute a jar:

    Name1 = c:\helical.asc

    Name2 = c:\files

    Name3 = hello

    java -jar nombrejar.jar -d + @[User::Name1] + @[User::Name2]+ @[User::Name3]

    My problem is when some parameter have a name with spaces, my task failure. e.g:

    Name1 = c:\test file\test 1\helical.asc

    If you write the argument:

    "java -jar nombrejar.jar -d" +" " + "''" + @[User::Name1] + "''"+" " + "''" + @[User::Name2] + "''" +" " + "''" + @[User::Name3]+ "''"

    , my task failure.

    How can i write my variables and these are ok?

    thanks

    You are not using the correct quotes. Try this:

    "java -jar nombrejar.jar -d " + "\"" + @[User::Name1] + "\" \"" + @[User::Name2] + "\" \"" + @[User::Name3] + "\""

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply