Delete Files & Folders

  • I have just started using SQL SERVER and could use a little help. I am trying to purge unauthorized files and folders on a daily basis from a departmental share. I have a table(TAB_FILES) that contains FILE_NAME and FILE_PATH. I would like for all files that are not listed in the TAB_FILES.FILE_NAME to be deleted from the share. I also want to delete all folders that are not listed in the FILE_PATH to be deleted. Any help would be greatly appreciated.

  • I have a "trim BAckup files" script on this site the you may be able to adapt. You would need to add a connector to the SQL Server to get the data you need.

    Also, read my "Push FTP" article. That will also provide some hints.

    Steve Jones

    steve@dkranch.net

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

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