News:

Function Finder  Find all the functions within source code files

Main Menu

Is there any way to rename external files in PB?

Started by SpellSword, September 03, 2007, 08:34:09 PM

Previous topic - Next topic

SpellSword

Is there a command that renames external files?

Example:
C:\GameDirectory\
PBGame.exe
FileThis.dat


Somewhere in the PBGame.exe code:
Rename("FileThis.dat"),("FileThat.dat")

Changes the files in the game's directory to look like this:
C:\GameDirectory\
PBGame.exe
FileThat.dat
When I dream,
I carry a sword in one hand,
a gun in the other...

empty


SpellSword

I just finished reading the PB Help tutorial on the MoveFile command, and it is perfect for what I'm doing!

Previously, I've been dumping all the contents of the files into variables & strings within the PB program then creating a new file and injecting them into it, which was a pain... and only worked on files containing data that could be loaded into variables & strings.

Thanks for pointing MoveFile out. I wouldn't have looked into that command's capabilities for this purpose.  :)
When I dream,
I carry a sword in one hand,
a gun in the other...