In some situations you may want to copy a folder from your GameMaker game. And it would seem trivial but not that easy. file_copy can only copy files, and folder functions only allow you to create, check, and search folders for files. However, given these standard functions, implementing a folder copying routine is fairly easy.
Idea used here is to find a list of files and folders via file_find_*, and then go through them, checking whether they are files or folders, copying or recursively calling recursively
function script accordingly. Sure that poses a potential problem if you were to copy entire disc contents to other location, but you are probably not going to be doing that via GameMaker... right?
Attached example contains the function and brief demonstration of functionality (you have to input source/destination paths as text).
Script' code follows,Continue reading