Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: MS80 on September 03, 2014, 09:51:54 AM

Title: copy file (FileUtil: copy)
Post by: MS80 on September 03, 2014, 09:51:54 AM
I would like to copy a file (pdf, jpg, mov, etc.) from one directory to another.

With FileUtil this seems to be possible and uncomplicated.
"FileUtil.CopyFileOrDirectory ( sourcePath, destinyPath );"

Maybe there is already a similar action to copy files out there?! I did not found a action for this situation....

Would be great to have a action with the following functionality:
- path source (absolute / relative with StreamingAssets)
- path destination (absolute / relative with StreamingAssets)
- file existing? folder existing?
- file written? failed?
Title: Re: copy file (FileUtil: copy)
Post by: Mark_T on January 18, 2016, 04:19:23 AM
I`m working to a non game application in Unity, and I would like to copy/paste some files from one location to another. Unfortunatelly, I`m not a coder, so I`m not able to write my own action. Would it be possile to get such actions: copy/paste/move files, with input request from user if needed.
Thanks.
Title: Re: copy file (FileUtil: copy)
Post by: dudebxl on January 18, 2016, 04:42:16 PM
There seem to be some actions in ecosystem related to this (create folder, check if file exists, load from files, etc)..
Title: Re: copy file (FileUtil: copy)
Post by: Mark_T on April 18, 2016, 07:29:35 PM
dudebxl - thanks for the delete file action. I`ll be really grateful if you can help with a copy file action (source/destination overwrite options). I checked everywhere and there is no such action. Cheers!
Title: Re: copy file (FileUtil: copy)
Post by: dudebxl on April 19, 2016, 12:33:50 PM
I don't think you need a new action. To copy, just get all the data from file and create new one and insert the data. To overwrite, just delete the file and then create a new one with new data.

Title: Re: copy file (FileUtil: copy)
Post by: craigz on May 08, 2019, 01:08:49 AM
Sorry to necro :)

Can someone doublecheck if the 'Create Folder' action is still present? Not popping up on ecosystem for me :/

Also, is there any direct way to copy a folder? Or is it best to iterate through another folder and just copy files individually?

Thanks!
craigz
Title: Re: copy file (FileUtil: copy)
Post by: autumnboy on August 30, 2019, 08:51:51 PM
+2 Is the create folder action lurking somewhere please?