-3

I have a game that I'm making off of my flashdrive, and I'm trying to make a save feature into an RPG game. I know I can just save all the data into a character bat file, and then call that bat file, but the problem is that my flashdrive looks cluttered whenever multiple characters get formed. understand? I need to beable to load a save, from a character folder (for organization) from a changing source folder, (Because the flashdrive will be in different USB ports, such as :E or :F etc.)

Matthew Lundberg
  • 39,899
  • 6
  • 81
  • 105

1 Answers1

2

You can determine the drive that a Windows batch file uses by using the CMD variable substitutions. Within a batch file, you can determine where the file resides.

%~d0 is the drive. %~dp0 is the directory. And there are more.

See What does %~dp0 mean, and how does it work?

Community
  • 1
  • 1
Matthew Lundberg
  • 39,899
  • 6
  • 81
  • 105