User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Copy directory from game folder to appdata

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Tiny's Avatar
    Join Date
    Jul 2006
    Location
    Sweden
    Posts
    571
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Copy directory from game folder to appdata

    How do I copy a directory (folder) from the game folder to users appdata to be able to read and write back and forth.

    I have read the post on here including archived example but they are several years old and I can't make it work. I have also read Microsofts info about xCopy but can't make that work either.

    Question is - what am I missing and doing wrong here?

    Example of my latest try. It is the "data"-folder I am trying to copy to the "testFolder":
    Xcopy /E "E:\A_work_2019\Game\data" "C:\Users\Eva\AppData\Roaming\MMFapplications\test Folder\"

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,159
    Mentioned
    78 Post(s)
    Tagged
    0 Thread(s)
    Try the file object, using AppDataDirectory$( "File" )+"\test folder" as the target location

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Tiny's Avatar
    Join Date
    Jul 2006
    Location
    Sweden
    Posts
    571
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Volnaiskra View Post
    Try the file object, using AppDataDirectory$( "File" )+"\test folder" as the target location
    Ok, will try that. Thank you.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Tiny's Avatar
    Join Date
    Jul 2006
    Location
    Sweden
    Posts
    571
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still can't figure out how to program it so it copies a whole folder.
    This is the path to the data-folder I which to copy: appPath$ +"\data"
    And this is the path to where it should be copied: appDataDirectory$ + "\MMFapplications\game\testFolder\"

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,159
    Mentioned
    78 Post(s)
    Tagged
    0 Thread(s)
    Hmm, I don't know. It doesn't seem like there's a way to do it with the File Object. There's another object called File-Folder Object, but I couldn't see a way there either. However I did finally find a way. It seems a little obtuse, and I feel like there must be another way, but it seems to work.

    Get the Directory Packer object from the Extension Manager. You can then pack a directory into a single file (press the "use expression" button to be able to use a dynamic source directory like appPath$ +"\data"). Then you can unpack file into a directory of your choice. I tried it - just copying a folder from desktop to another folder on desktop - and it seemed to work fine. I guess you probably will want to delete the file (using File object I guess) afterwards.


  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,159
    Mentioned
    78 Post(s)
    Tagged
    0 Thread(s)
    sorry - double post

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Tiny's Avatar
    Join Date
    Jul 2006
    Location
    Sweden
    Posts
    571
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh that looks interesting! Will try it.
    Thank you!

  8. #8
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,003
    Mentioned
    20 Post(s)
    Tagged
    2 Thread(s)
    How are you trying to copy the folder?

    This is not how it works. You need to loop through files with the File-Folder object and copy each file. First you create the destination directory structure you want with the appDataDirectory$ + "\MMFapplications\game\testFolder\"

    Then you use File-Folder to loop through the local data folder, and then copy the files one by one. It runs its own browsing loop, so you can copy and create files on the fly. You can't simply choose a directory and copy it over, this is the route you will have to go.
    Want to learn Clickteam Fusion 2.5?




  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Tiny's Avatar
    Join Date
    Jul 2006
    Location
    Sweden
    Posts
    571
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This works but.....
    Seems the Directory Packer has a limit of 165 Mb because the unpacked directory never exceeds that although the directory to be moved is >700 Mb. This can of course be solved with splitting it up in parts.
    But #2, it takes a long time to pack and unpack even the 165 Mb.

    Good thing while searching for solutions is that I don't think I will need the moving of directory from within the game since it will be published through Steam. As far as I understand, I have studied their documentation only briefly, one can handle the installation of files and folders through their site. Will have to read more to be sure.

    Thanks a billion Volnaiskra for helping me out! And it was not a waste of time because I will need the various ideas in other projects.

  10. #10
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,461
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    This problem has been reported/asked many time sinces 2009. It is too complex. It would be nice for Clickteam to address this issue of "copy a folder" It is a common task and for new users is hard to figure out. Just do a search on "copy directory" and you will get a list going back to 2009.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Saving an array in appdata folder?
    By SubWooferX3 in forum Fusion 2.5
    Replies: 1
    Last Post: 21st July 2015, 07:30 AM
  2. LocalLow Directory in #AppData#
    By TJM in forum Install Creator and Patch Maker
    Replies: 7
    Last Post: 10th December 2014, 09:33 PM
  3. AppData directory
    By Shawn in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 28th May 2013, 02:52 PM
  4. Empty Folder in AppData Folder
    By TJM in forum Install Creator and Patch Maker
    Replies: 1
    Last Post: 26th October 2012, 01:36 PM
  5. Directory/folder problem? (Game not working)
    By MrSaturn33 in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 20th July 2010, 12:58 AM

Posting Permissions

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