Can anyone explain me how to do this?
Problem is @fname contains quotes so concatting %source% and @fname gives an error...
forfiles /P "%source%" /M %file%.* /D -1 /C "cmd /c if exists %source%\@fname.pdf del @path"
The double quotes are not the issue. You've got a syntax error in your command line: instead of if exists … it should go if exist ….
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With