Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    india
    Posts
    67

    Unanswered: delete files more than n hours

    Hi everybody,

    Can anyone help me out in deleting files more than n- hours from a physical folder using xp_cmdshell ....

  2. #2
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621
    Get list of files from folder by xp_cmdshell 'dir d:\folder\*.*' into table, parce files info about time creation and delete old ones.

  3. #3
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Archived post which will help you.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •