I've been lazy today. I finished a sci-fi movie named 'Quanta', did a little website updating, ran some backups, started Season 3 of Colony, and made a payment on my Amazon Store card.
Learned that Hannah's fiance's grandfather fell and broke a hip. Mother has left for the Outer Banks with Sharylon. She plans on getting back on the 6th. We got a $200 bonus at work Friday in the form of a credit card. I spent mine on a Windows 10 Pro PC-on-a-stick. Should be a handy gadget to have. I've also ordered a 10" android tablet for Susan, and an identical one for me. They run the latest Android OS, Pie.
Emma got in from the University of Kentucky last night, and slept late today. Her classes are difficult, but I think she's enjoying college life. She heated up a pizza for lunch, and Susan and I had some. It's in the 90s today through next Thursday. Then, starting next Friday we should have a few cooler days in the 70s.
I wrote a C# console app today that will wind up saving me a few minutes everyday that I had been spending to launch 7zip and manually zip multiple subdirectories of my My Documents for backup via uploading. Note: I commented-out the section that zips my DokuWiki, because I hope to replace it with localhost-hosted blog entries.
Here is the source code:
using System;
using System.IO;
using System.Diagnostics;
using System.Threading;
namespace ZipThem{
class Program {
static void Main(string[] args){
ProcessStartInfo startInfo = new ProcessStartInfo();
Console.Clear();
startInfo.FileName = @"C:csdevtoolsZipFolder.exe";
if(!File.Exists(startInfo.FileName)){
Console.WriteLine("n Couldn't find ZipFolder.exe in csdevtools... goodbye...");
Thread.Sleep(1500);
Environment.Exit(0);
}
string startPath = @"C:UserskyratDocumentspublic_html";
string zipPath = @"C:UserskyratDocumentspublic_html.zip";
ZipDirectory(startPath, zipPath, startInfo);
startPath = @"C:UserskyratDocumentsTwine";
zipPath = @"C:UserskyratDocumentsMyTwineStories.zip";
ZipDirectory(startPath, zipPath, startInfo);
startPath = @"C:UserskyratDocumentsMySquiffy";
zipPath = @"C:UserskyratDocumentsMySquiffy.zip";
ZipDirectory(startPath, zipPath, startInfo);
startPath = @"C:Zwamp";
zipPath = @"C:UserskyratDocumentswebsite atop zwamp.zip";
ZipDirectory(startPath, zipPath, startInfo);
startPath = @"C:csdev";
zipPath = @"C:UserskyratDocumentscsdev.zip";
ZipDirectory(startPath, zipPath, startInfo);
/* startPath = @"C:UserskyratDocumentsDokuWik";
zipPath = @"C:UserskyratDocumentsDokuWik.zip";
ZipDirectory(startPath, zipPath, startInfo); */
Console.WriteLine("nn Press any key to exit...");
Console.ReadKey();
}
static void ZipDirectory(string startPath, string zipPath, ProcessStartInfo startInfo){
if(Directory.Exists(startPath)){
try{
if(File.Exists(zipPath)){ File.Delete(zipPath); }
Console.Write("n Now zipping '{0}' folder...", startPath);
Console.WriteLine(" to {0}", zipPath);
Thread.Sleep(2000);
startInfo.Arguments = startPath + " " + zipPath;
var proc = Process.Start(startInfo);
proc.WaitForExit();
Console.WriteLine(" Successfully zipped folder {0}", Path.GetFileName(startPath));
}catch(Exception ex1){
Console.WriteLine("n Exception thrown while trying to zip folder 'public_html':n " + ex1.Message);
}
}
}
}
}