S shafiq2 New Member Nov 27, 2014 #1 Hi, I am looking for a VBA code to delete all file in a folder if file name starts with "Reptxxxxxx" The file from left 4 characters always starts with Rept Best Regards, Shafiq
Hi, I am looking for a VBA code to delete all file in a folder if file name starts with "Reptxxxxxx" The file from left 4 characters always starts with Rept Best Regards, Shafiq
V Villalobos Active Member Nov 27, 2014 #2 Hi shafiq2, Try this: Code: Sub DeleteSpecificFile() Kill "C:\Documents\Rept*" End Sub
S shafiq2 New Member Nov 27, 2014 #3 Hi Villalobos, Thanks for the code but it is not working, says the file is not found. Best Regards, Shafiq
Hi Villalobos, Thanks for the code but it is not working, says the file is not found. Best Regards, Shafiq
S shafiq2 New Member Nov 27, 2014 #5 Hi Villalobos, It is is working perfectly. Thanks for the help. Best Regards, Shafiq
Sanjeev06 New Member Nov 28, 2014 #7 Sub delete() Dim i As String i = "D:\Roung\rept*" Kill i End Sub