User Tag List

Results 1 to 7 of 7

Thread: File object will not delete directory unzipped by Zip Object

  1. #1
    Clicker Fusion 2.5SWF Export Module
    SuperDisk's Avatar
    Join Date
    Jul 2012
    Location
    USA #1
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    File object will not delete directory unzipped by Zip Object

    Hi there. I am downloading zipfile from server using FTP, unzipping it into a folder using Zip Object (Clickteam), then trying to delete it using the file object.

    However, the file object doesn't want to delete the directory.

    When I inspect the unzipped folder with Explorer, its 'Read only' property is set.

    Why does the Zip Object set the unzipped directory to Read only? Is there any way to delete the directory without having to do it with Explorer?

    Should I use a different Zip Object than Clickteam's?

    Thanks.

  2. #2
    Clicker Fusion 2.5SWF Export Module
    SuperDisk's Avatar
    Join Date
    Jul 2012
    Location
    USA #1
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, my little hack solution for now is to create a batch file with the text:

    rd /q /s directory

    and then run it instead of deleting using the file object. Quite lame. Is there any elegant fix for this?

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleInstall CreatorUnicode Add-on
    Gustav's Avatar
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    1,017
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you didn't tryed yet: Read the error code from file object with LastError( "File" ) after you wanted to delete the file.
    Then have a look in the MMF help file to know the meaning of the code. This could help to solve the problem, if you know what's happening.

  4. #4
    Clicker Fusion 2.5SWF Export Module
    SuperDisk's Avatar
    Join Date
    Jul 2012
    Location
    USA #1
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried. The error was just an empty string.

  5. #5
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleInstall Creator ProUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    573
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    If you're referring to the "read-only" attribute set in the general tab you can ignore that. Most folders have that set in windows. The ACL is what matters.

    Where are you unzipping the file to? If you are using Vista/7 programs are likely to be denied access to the program files folder. Its recommended that you store your temp files in the temp folder ie: "%temp%\myappfolderhere" You shouldn't have an issue removing the files from there. If the files are going to be reused you can store in "%appdata\myappfolderhere"

  6. #6
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    2,961
    Mentioned
    17 Post(s)
    Tagged
    2 Thread(s)
    I also had this issue, I ultimately used the File-Folder object which deletes folders and subfolders with 0 issues.
    Want to learn Clickteam Fusion 2.5?




  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleInstall CreatorUnicode Add-on
    Gustav's Avatar
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    1,017
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I ran into such a strange issue some time ago, that the File object didn't work anymore.
    Well... a file action failed and an error code was set. The File object only works again in further actions, if you reset the error code.
    In some cases you think there is a bug, but if you know that you only have to reset the error code it works again...
    Good to know. ^^

Similar Threads

  1. Directory selector problem (file object)
    By Nifflas in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 20th March 2010, 11:43 PM
  2. Zip Object - Precentage Extracted/Unzipped?
    By Nerdy Nerd in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 23rd January 2010, 11:41 AM
  3. Setting Directory with File Object
    By Renatos in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 26th April 2008, 12:24 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •