Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
HeathLocke

Is there any way to move a file with RGSS?

Question

I'm trying to move a file from the pictures folder (Graphics/Pictures) to the main game folder (the one with Game.exe) using RGSS. I know that in Ruby you can do that with FileUtils, but it doesn't works on RMXP, and the built-in File class doesn't have anything like that. Is there any way to move files with RGSS?

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Uh I'm not exactly sure what you are asking for. Is the graphics folder "the main game folder?"

Share this post


Link to post
Share on other sites
  • 0

Uh I'm not exactly sure what you are asking for. Is the graphics folder "the main game folder?"

No, the main game folder is the folder where the Game.exe file is at (see pic). The graphics folder is inside that folder.

eH07tE8.png?1

I wanna move the file to this folder.

 

I would recommend using the rename function.  You could also always open the file read it into a buffer, then write it back out to a new filename. 

 

I'll take a look at that and tell you if it works. Thanks in advance.

 

Edit: Yes, it worked! Thanks a lot.

In case anybody is wondering, the syntax is:

File.rename(from, to)
Edited by HeathLocke

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...