2 Replies Latest reply on Oct 13, 2011 11:30 AM by dmeN

    Delete File?

    dmeN Level 5

      I need to delete a file using AIR (2.7) and keep getting Error #3001: File or directory access denied everytime I try. Same thing using moveTo...

       

      I believe it's some user rights thing, but not sure what. I have admin rights on the machine - Windows 7.

        • 1. Re: Delete File?
          dmeN Level 5

          Here's a super simple test trying to delete a txt file that demonstrates:

           

          import flash.filesystem.*;

           

          var targetDir:File = targetDir = new File("c:/");

          var targetFile:File = targetDir.resolvePath("test.txt");

          targetFile.deleteFile();

           

           

          I get a 3001 every time.

          • 2. Re: Delete File?
            dmeN Level 5

            OK, it's a permissions issue. I can either run the app as admin, or give the current user rights to the folder I need to delete in... either way, I got it.