Delete bak files (any other way beside using xp_delete_file)

  • Hi -

    I am running MS SQL desktop engine, and trying to delete older copies of .bak files from C drive. How can I add xp_delete_file to master DB in order to run it? If that is something I can not do, is there any other way I can use to delete the files?

    Thanks.

  • MSDE is a SQL Server 2000 product, isn't it? Does it not come with the delete file xp? If not, you could write your own script in C#, VB Powershell or your favourite scripting language.

    John

  • You are correct, it is SQL 2k. It does not come with xp_delete_file.

  • As you recommended, I will be using vb script to delete... Thanks for you reply.

  • lsalih (12/21/2012)


    Hi -

    I am running MS SQL desktop engine, and trying to delete older copies of .bak files from C drive. How can I add xp_delete_file to master DB in order to run it? If that is something I can not do, is there any other way I can use to delete the files?

    Thanks.

    Which logins on your box have SA privs?

    --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 5 posts - 1 through 4 (of 4 total)

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