Jan 30, 2002 #1 TeddB MIS Joined Jul 16, 2001 Messages 38 Location US Help Wanted !! I have an Access query containing names of thousands of filenames, which need to be deleted from disk. Can this be done entirely from Access? If so, could you please give me a code example. Much obliged :-> Ted
Help Wanted !! I have an Access query containing names of thousands of filenames, which need to be deleted from disk. Can this be done entirely from Access? If so, could you please give me a code example. Much obliged :-> Ted
Jan 30, 2002 1 #2 ide Programmer Joined Apr 10, 2001 Messages 236 Location EU something like this. use the Kill procedure with full path to delete a file. Sub main() Dim strPath As String strPath = "d:\temp\Book13.xls" Call sbDeleteFile(strPath) End Sub Public Sub sbDeleteFile(strFullFilePath As String) If Dir(strFullFilePath) <> "" Then Kill strFullFilePath End Sub Upvote 0 Downvote
something like this. use the Kill procedure with full path to delete a file. Sub main() Dim strPath As String strPath = "d:\temp\Book13.xls" Call sbDeleteFile(strPath) End Sub Public Sub sbDeleteFile(strFullFilePath As String) If Dir(strFullFilePath) <> "" Then Kill strFullFilePath End Sub
Jan 31, 2002 Thread starter #3 TeddB MIS Joined Jul 16, 2001 Messages 38 Location US ide, Thanks for the quick response Upvote 0 Downvote