Jump to content

Recommended Posts

Posted

Just checking... :whistle:

Is there a better way to write this for 7 different file types?

FileCopy("C:\Users\------\Saved Games\Diablo II\*.d2s", "F:\Game Backup\Diablo II", $FC_OVERWRITE)
FileCopy("C:\Users\------\Saved Games\Diablo II\*.key", "F:\Game Backup\Diablo II", $FC_OVERWRITE)
FileCopy("C:\Users\------\Saved Games\Diablo II\*.ma0", "F:\Game Backup\Diablo II", $FC_OVERWRITE)
FileCopy("C:\Users\------\Saved Games\Diablo II\*.ma1", "F:\Game Backup\Diablo II", $FC_OVERWRITE)
FileCopy("C:\Users\------\Saved Games\Diablo II\*.ma2", "F:\Game Backup\Diablo II", $FC_OVERWRITE)
FileCopy("C:\Users\------\Saved Games\Diablo II\*.ma3", "F:\Game Backup\Diablo II", $FC_OVERWRITE)
FileCopy("C:\Users\------\Saved Games\Diablo II\*.map", "F:\Game Backup\Diablo II", $FC_OVERWRITE)

 

Posted

I just glanced over the rules.

I'm not automating anything within the game itself. This post pertains to simply copying files to backup.

Posted (edited)

I understand, not a big deal for me.  Just want to let you know about it.

But I have played a lot D2 in the past, and I do not believe Blizz agrees you to copy current character stat to another location, and come back if you die.

Edited by Nine
Posted

Hi,

externally call robocopy.exe (included in Windows since XP), would be easy and quick. Have a look at the switch /if (include file), which can be used multiple times in the call.

The exitcode of robocopy will tell you exactly, what happened. Running it twice will give you an exitcode of 0 (zero), if source and destination match.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...