Category Archives: Batch Scripting

SET “MYVARIABLE=Old Windows Scripting Language”

Windows Knows How to Make You Go Slow

Using my handy calendar calculator it appears I’ve not done much more than install this site and sit on it for 2033 days.  So if I were to catch you all up, that would be a great deal of blogging. (We’ll see)  A minor nuance to this site – I usually don’t make the blog the landing page, I use a static page in WordPress, but I’m feeling adventurous and sharequacious (that’s probably not a real word, mate Loquacious and Share together)

Ok, enough Oprah-ing, lets get to the topic…

Windows 10

I installed Windows 10 the day it was available.  I’ve not “upgraded”  windows since I installed Developers copies (bought a couple of copies from Fry’s in the hardware department) of Windows 7 Professional.  This is not a meta-commentary on Windows 10, but a more specific mini-rant about the limits of Windows command line, batch scripting and then of course the new-language learning curve of the Powershell scripting.

Windows 7

I suspect learning the Powershell scripting in windows 10 will eventually be useful, but man did windows develop the longest (like words in german) run-on-sentences type commands for their Powershell.

Ok, so too the point.  I do a great deal of scanning from my HP Photosmart 7525 printer.  Everything from payments from clients to prescription medicines and any other paper that needs to be digital.  All this is ultimately stored on my Ubuntu Servers, but as data hits my Windows 10 client, there are some situations where devices detect and refuse to “save” to network drives, forcing the data onto my client (where I DON’T WANT my data stored).

HP Photosmart 7525 Printer

So I was inspired by all my bash scripting writing to become more competent at batch script writing in windows.  To my (my adult life predates DOS in any form) surprise batch scripting is now old hat and has been usurped by Windows PowerShell Scripting.  I was willing to improve/expand my batch scripting knowledge base but learning WPS is basically like going back to college for a 4 year degree in Ancient Mandarin Chinese Sign language.

Windows 10 PowerShell

The simple outcome I was trying to create was to move my GoPro folders that keep importing on to my Window’s Client to Samba Share Drive which I use daily for all sorts of save-to from Windows to Ubuntu.  But windows batch scripting doesn’t allow you to use wildcards for directories.

I suppose the root of the problem in regards to scanning was how to change the default location to somewhere besides the window’s client directory that my 7525 was scanning too.  I did finally find a place to change those settings so in regards to scanning and manipulating data and directories in both batch and bash, I now have those scans going to my ubuntu server directly, so all my scripts can be in bash again.

Ubuntu Servers

In regards to my GoPro importing dilemma, I found an elegant windows solution.  I created a directory link in the windows directory that GoPro imports too (from the Camera to the PC) and set that as my default directory for the imports.  GoPro still knows its a remote location somehow but allows it, though it doesn’t allow it when I just give it a samba shared directory as an import destination.

My prayer to the universe is that there is suddenly a huge interest in gaming developers and high-end enterprise/consumer based applications to be engineered to run on Linux Desktops as seamlessly or better than they run on the true Proprietary Pirate Ship Microsoft.

As a final thought though I do believe the “free” download of Windows 10 might be an indication that Microsoft is finally discovering the tidal wave of money it could make off of microtransactions as opposed to trying to sell you a $400 milk jug (the container in which all your programs must run).  The last time I bought a windows product was whenever Windows 7 Professional came out.  I got 2 copies (for my wife and I) and they were like $120 or $130 each.

Wikipedia says that Windows 7 was available for general release: 22 October 2009; 5 years ago. (will soon be 6 years ago).  So now that Windows 10 is currently free I don’t feel as IMPOSED upon to spend some $ on some microtransaction or 10 in the near future.  I don’t own a window’s phone (Samsung Notes & iPhones), so this is windows chance to inspire consumers to purchase something from them instead of forcing them to.

Well that was a short blog, thanks for reading!