This works in windows command line as I have tried it:
I thought I might be able to run it as a shell command within VBA but with CurrentProject.Path like this:
I have played around with it but keep getting syntax errors and I cant work it out!
Thanks in advance
Code:
ForFiles /p "C:\Users\David\Desktop\New Leads\ContactProofs" /s /d -30 /c "cmd /c del @file"
I thought I might be able to run it as a shell command within VBA but with CurrentProject.Path like this:
Code:
Shell ForFiles /p & Application.CurrentProject.Path & "\New Leads\ContactProofs" /s /d -30 /c "cmd /c del @file"
I have played around with it but keep getting syntax errors and I cant work it out!
Thanks in advance