Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete contents of directory

Status
Not open for further replies.

PreacherUK

Technical User
Sep 26, 2002
156
NL
Hi,

I want to clear a directory of text files before I start populating it with new ones.

Whats the quickest most elegant way of doing this from a DTS package/Activex script task?
 
And will this delete all the text files in the directory or the directory itself?
 
That would be for all files but another method would be ...

EXEC master..xp_cmdshell 'DEL C:\MyDir\*.* /q'

Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top