Batch File Failure


  1. Posts : 714
    Win 7 Pro, SP1, x86, Win-11/Pro/64
       #1

    Batch File Failure


    For the past month, I've been writing batch files to remove all the temp files from a PC.
    I started with Win-11, then Win-10, then Win-8.1 and all was well. The batch files worked, and all the temp folders were cleaned.

    Then I tried basically the same thing with Win-7, Ultimate/x86 and a simple line to delete the temporary internet files from Firefox, fell dead, with an answer "File not Found" or something like that.
    And that was with 5,110 temp files in the folder. And yes, I checked the path name, double checked it and triple checked it. No go. But when I accessed the same folder in Windows Explorer, there were the files, and I could easily delete them manually. And I did.
    Other simple batch commands, like, "Del /f/s/q C:\*.tmp" work just fine.

    So, being out of ideas myself, here I am. Looking for fresh ideas.

    TM
      My Computer


  2. Posts : 7,100
    W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
       #2

    i use this 1, works on 10 as well

    Download TFC
      My Computer


  3. Posts : 714
    Win 7 Pro, SP1, x86, Win-11/Pro/64
    Thread Starter
       #3

    torchwood said:
    i use this 1, works on 10 as well. Download TFC
    As a matter of fact, it works pretty dang well on Win-11/Pro/64 as well.
    Thank You, that got rid of the Firefox Temporary Internet Files on my old eMachine running Win-7 Ultimate.
    Where nothing I tried worked.

    I just ran TFC here on my Win-11 PC and it did a pretty good job, and only left 1184 junk files. But, from exactly Where, I don't know.
    I noticed that when it cleans out the temp files from Firefox, it also takes out the last three levels of folders as well.
    Kind of like burning the barn down, to get rid of a mouse. But fear not, Firefox rebuilds those folders on the next run.

    At this time, I have no way to know what other folders may have been deleted.

    Since my Cleanup Batch file, is 100% effective on Win-8.1, 10 and 11 I'll reserve the use of TFC for Win-7.

    Thank you sir, your assistance is very much appreciated.

    Mark this topic, "Solved"
    TM

    - - - Updated - - -

    WELL, not 100% solved!

    I thought if TFC removed everything in the path to the Firefox temp files, including the directories housing them, then maybe I could to that within my batch file. I had just been trying to remove the files themselves, and not the directories housing them. Once the directories have been deleted, the temp files are gone too! VOILA! Success!

    DANG, it worked! And I can continue to develop my Win7Cleanup.bat program, which does remove more files than TFC.
    And I have TFC to thank for the inspiration, as well as the solution to my problem that prompted this topic.
    And a big Thank You to 'Torchwood' too!

    TM
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:40.
Find Us