cmd file name with space between each string

  • I've just run the OP's full command after renaming my test rar file, I even placed the file into C:\Import and the command works fine, so my guess is now an issue with xp_cmdshell or WinRar isnt installed

  • I don't have XP, SQL Server is doing this on W2k3.

    Yes, I have the folder:

    c:\import\PastaExportacao SGCTlocal - 4.01 - 20120523 112426 - T - 1118.rar_Dir

  • What error messages do you get?

  • Very strange.....

    My command is now as :

    "C:\Program Files\WinRAR\WinRAR.exe" x -u "c:\import\PastaExportacao SGCTlocal - 4.01 - 20120523 112426 - T - 1118.rar" "c:\import\PastaExportacao SGCTlocal - 4.01 - 20120523 112426 - T - 1118.rar_Dir\"

    It works fine if i put it on the cmd of the server.

    If it is executed from SQL Server It does not work....

    I have the xp_cmdshell enabled on the surface area...

  • No erros message is displayed

  • It say "Command(s) completed successfully."

  • what do you get if you remove no_output?

  • 'C:\Program' is not recognized as an internal or external command,

  • This is what i get:

    'C:\Program' is not recognized as an internal or external command,

  • To work I had to put like this:

    select @cmd = 'C:\"Program Files"\WinRAR\WinRAR.exe x -u '+@NomeFinal+' '+@DirectoriaFinal+''

  • Now it works

  • then possibly your sql service account does not have permissions to run winrar.exe

    MVDBA

Viewing 12 posts - 16 through 26 (of 26 total)

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