1.

Solve : Help needed for file deletion based on file extension and specify folder?

Answer» <html><body><p>Hi All,<br/><br/>Appreciate if anyone could help =)<br/><br/>I'm trying to create a <a href="https://interviewquestions.tuteehub.com/tag/batch-893737" style="font-weight:bold;" target="_blank" title="Click to know more about BATCH">BATCH</a> file that:<br/><br/>- delete all files in c: drive with the extension .txt, .<a href="https://interviewquestions.tuteehub.com/tag/doc-248445" style="font-weight:bold;" target="_blank" title="Click to know more about DOC">DOC</a>, .xls, .ppt<br/>- deletion to <a href="https://interviewquestions.tuteehub.com/tag/exclude-979002" style="font-weight:bold;" target="_blank" title="Click to know more about EXCLUDE">EXCLUDE</a> specific directories (c:\windows and program files and it's subfolders<br/><br/>The purpose of this batch files is to delete all users' doc and files in c: while preventing accidental deletion of system/application text files like virus definition.<br/><br/>Thank you!<a href="https://interviewquestions.tuteehub.com/tag/sorry-648642" style="font-weight:bold;" target="_blank" title="Click to know more about SORRY">SORRY</a>, we don't help with homework.Hi commando,<br/>I think you got me wrong.<br/><br/>I have no problem with the file extension part.<br/><br/>I'm only having problem with the if/for statement to exclude the directories. Appreciate if you can provide <a href="https://interviewquestions.tuteehub.com/tag/guidance-25562" style="font-weight:bold;" target="_blank" title="Click to know more about GUIDANCE">GUIDANCE</a> on this part.Hi all,<br/><br/>I managed to find a solution to this. Thank you.</p></body></html>


Discussion

No Comment Found