100 days of code: Day 25

I am tracking notes on PowerShell in PS1 files on my git hub repository. You can see all 100 days of code entries on the blog category page.

Well it turns out my lofty goals of an all chapter in one day didn’t go so good. I guess I needed much more of a break from thinking than I thought.

I did end up doing some other things though. Not sure if this counts as coding or not but here’s what I was thinking of:

I wanted to move all my blizzard games from Computer B (Win 7) to Computer A (Win 10) since all of the games are up to date on Computer B. And my favorite method of doing so is with my old standby utility, robocopy.

And these are some large games. Destiny 2 alone is 84+ gigs. And I’ve never even played that one. Which is kind of weird. Just a an 84 gigs sitting there unused.

Anyway, I have the games:

Destiny 2
Diablo III
Hearthstone
Heroes of the Storm
Overwatch
robo-over.txt
StarCraft
StarCraft II

Which comes out to about 192 Gigs of storage space. So the question “how do I copy this 192 gigs of data from Computer B to Computer?”

Well if you first say “over the network” that would be accurate. Problem is the network was apparently only transferring at 32 Mbps. It’s a 100Mbps switch and with Cat5e network cables and gig Ethernet at both ends. I should be faster than that. I’ve literally downloaded steam games over the internet faster than 32Mbps.

It just so happens I have an upgrade to my network switch. I think it’s the maximum number of ports a switch can have without being the managed kind. Like 48 maybe, I forget. Anyway I have had this gigabit switch sitting on my couch since last December which I decided to finally connect in hope of higher bandwidth.

But it didn’t work. Still the same 32Mbps bandwidth.

So finally I started pulling out my old hard drives until I found the one with my backups of the blizzard games. They were from last August but I can use all the help I can get.

So I used robocopy to copy all those games from Computer B to my USB 3 hard drive. And once that was done I copied the games from the hard to a Computer A.

According to robocopy, the copy speed was: 5395.945 MegaBytes/min. I don’t really like converting that into Mbps but I’m going to say I made the right call on using the drive instead of the network. And I would kind of like to know what the hell happened to my network bandwidth.


I also have been contemplating, it’s in something of a thought experiment at this stage, of a utility for my steam games for a while now.

Okay this is kind of stretching the definition of coding but lets just go with it.

Up until now I have been doing a robocopy of my steamapps\common folder (where all the games are) just raw uncompressed: if it’s there it’s copied to the network location or USB drive or whatever. Which has been working. But I’ve been trying to come up with a more automated way of doing this. And with compression and skipping the ones that don’t need to be backed up is just a bonus.

The idea goes something like this:

Using the command line of 7zip, all the game directories (in the steamapps\common folder) would be put into highly compressed 7z files matching the name of the folder (DOOM.7z for the DOOM folder etc). A hash would then be taken, of the 7z file (MD5 or SHA1, haven’t decided yet. Maybe both.).

The last modified date of of the folders would be collected in turn as each of the 7z files were created.

Once this first time run was made each subsequent run of the utility would go through and check which folders had a different modified date and create a list. And based on that list go through and create and replace all the necessary 7z files for the folders that have apparently changed.

This is so I have a highly compressed version of my steam library as a back up that is kept up to date when games are patched.

In laying it all out like this I’m not sure the MD5 and/or SHA1 hashes are necessary against the zip files. Unless…I usually don’t have the entirety of my Steam library installed at any one time so at different times different games would be installed. So I re-installed a previously backed up game and that game had not been patched then in theory the hashes for the 7z files should match, thus I could test against and not bother replacing the 7z file. Would probably be better if I could determine that before 7z was created. Might help time-wise since some games are many gigabytes in size.

I’d probably pipe everything into a CSV file for convenience.

I’m not sure what use this would necessarily be of that modified date would necessarily be the best way of testing if a game needed to be re-backed up.

Like I said, it’s all on the drawing board at this point and more of a thought experiment. I don’t know that this would even have any useful purpose or not. I would like to write it anyway though. In PowerShell so I get the practice.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s