How to make an app - Andromo App Maker


No announcement yet.

File.Delete bug

  • Filter
  • Time
  • Show
Clear All
new posts

  • File.Delete bug

    File.Delete(_WindowsFolder.."\\Prefetch\\*.*", false, false, true, nil);
    Error deleting one o more files... (not is deleted any file)

    The files in this folder is not in use... manual deleting is very easy but with ams7 fails...
    Last edited by Solmos; 12-20-2007, 02:52 PM.

  • #2
    Might need more information on this:

    - What OS are you running this on?
    - User account or Admin account?
    - Is the folder protected?
    - Did you create that folder?
    - What type of files inside the folder?
    - Are there any sub folders?

    Are you using the latest version of AutoPlay?

    Adam Kapilik


    • #3

      Windows XP profesional Service pak 2
      AMS 7

      user account (admin privilegies)

      the folder is C:\windows\prefetch

      No modification in this folder, default by windows.

      th file tipes is *.pf (113 files found) and one file *.ini

      any is deleted...

      No subfolders in this folder..



      • #4

        Try this

        pFILES = File.Find(_WindowsFolder.."\\Prefetch", "*.*", false, false, nil, nil);
        for E, pFILE in pFILES do
        File.Delete(pFILE, false, false, false, nil);


        • #5
          tested and Not work...

          Any file is deleted...


          • #6
            Well I haven't tried the code here Solmos, the code should have worked fine though.

            If you don't mind me asking, what are the files in "Prefetch" ? How come they aren't necessary in one's computer ?


            • #7
              the prefetch files (*.pf) is not necesary because is a backup of the programs...

              Pleae, tests your code in your system...

              In my system file.delete works good, but not work deleting files in prefetch folder...

              This is a BUG!!! of AMS7 (and AMS6...)... please update AMS7...


              • #8
                Originally posted by Solmos View Post
                the prefetch files (*.pf) is not necesary because is a backup of the programs...
                These files are not backup files, but files specially ordered on a disk in order to improve speed of loading prefeched applications in Windows (Windows Media Player, Internet Explorer and so on). There is absolutely no reason for you to delete them, since they will be recreated the next time you run your applications.
                Never know what life is gonna throw at you. ZubTech


                • #9

                  Well perhaps they are files that are sort of protected since they are files that are needed in order to improve speed performance / backup


                  • #10
                    No, they are not protected files system ...

                    And no, it is not needed. It is simply cache.

                    These files can be deleted without any problem.

                    And even if they were protected files in the system, there is not any reason that AMS7 if I do a function to delete them, not delete them.

                    And I need to erase NOW!

                    I expect an update or a scrip staff indigorose early to remove them ...


                    • #11
                      And I need to erase NOW!
                      Then just delete them manually, although I don't know why you are so desperate to delete them. I checked the size of my Prefetch folder and it is only 4.5 mb so those files don't take up much space.

                      I am so out of here :yes


                      • #12
                        Because I try to convince me that not delete these files? Or do so manually?

                        Instead of saying stupidities, and try to convince me that it manually delete! BUSCÁIS WHY NOT A SOLUTION TO THIS BUG?

                        DELETING NEED NOW! WITH AMS7, no matter why and for that!

                        What matters that AMS7 THE FAILURE TO DELETE!

                        If the product is defective that I returned the money! Or take an update to resolve the BUG NOW!


                        • #13
                          Indigorose, I think you should return the money to this very unpleasant and uninformed guy.

                          The APMS returns an error code 1024 when trying to delete those files. It is obvious that Windows do not allow you to mess with these files. Windows Explorer and Command Prompt must be using some other approach when deleting contents of this specific folder, most likely some specific Windows API call. There is no reason what-so-ever that APMS File.Delete action would fail on this one folder only. By the way, this could be a Lua issue as well.

                          Mark Russinovich and David Solomon, big time kernel experts have explained the Prefetch functionality here:

                          There is also Ed Bott's article here:
                          Never know what life is gonna throw at you. ZubTech


                          • #14
                            ok thanks Bule

                            But I do not understand why the AMS could not erase (or failure) those files .. is or not a BUG?

                            I need to remove the AMS, because I am creating a program to clean the system style ccleaner ..

                            I lack the option of cleaning the prefetch and an option to clear the clipboard ... (but clear clipboar not is possible with AMS...:-( )

                            What I have done others

                            Any suggestions??



                            • #15
                              Well then, run a minimized command prompt like this to delete those data:

                              File.Run("cmd.exe", "/c del /F /Q \"%windir%\\Prefetch\\*.*\"", "", SW_MINIMIZE, true);
                              To clear the clipboard, enable the Clipboard plugin and simply copy an empty string to it:
                              There is no reason to yell.
                              Never know what life is gonna throw at you. ZubTech