EXEC xp_cmdshell

  • EXEC xp_cmdshell 'findstr "DWG" E:\ABC\XYZ\123a.TXT > E:\ABC\XYZ\987a.TXT'

    file is not creating while execute in SSMS, but if we execute same command in command prompt it is creating file, can you please help me.

  • Error message?

    something like...."SQL Server blocked access to procedure 'sys.xp_cmdshell'" ?

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • Nagabhushan (7/10/2012)


    EXEC xp_cmdshell 'findstr "DWG" E:\ABC\XYZ\123a.TXT > E:\ABC\XYZ\987a.TXT'

    file is not creating while execute in SSMS, but if we execute same command in command prompt it is creating file, can you please help me.

    What result do you get after executing it in the SSMS?


    Sujeet Singh

  • Is the "E" drive on the server or your local machine?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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