Spent the better part of the last two weeks setting up a new VPN for the car wash. Primarily as a backup conduit, but once I make it a hardware-always on-more like a WAN, it will do more (like remote gateway…super handy for credit cards transactions). It’s been a minor nightmare until I discoved the router I was using wouldn’t let the IPSEC traffic into the office network.
Now that it is up and running, time to get to scripting! Well, more like batch files, but the same goal is accomplished. With 1 batch file I can:
- Connect to the VPN with the correct username and password
- Map a drive with the correct username/password
- pause for 20 seconds
- Map another drive
- pause for 20 seconds again
- Transfer files from the remote location to the office
- Retrieve files from the office to the remote location
- Disconnect from the VPN
I could unmap the drives too, but it’s not really necessary.
That is a batch file that has about 15 lines of code. Then I add it to the scheduler to run at 12:30AM everyday, share the VPN connection with all users and put a link on the desktop for the backup.
So, it has taken me the better part of 4 hours to setup 3 locations, but the last 3 will be a piece of cake.
And, there is no way I would have been able to figure out how to do this on the Mac. My ponytail isn’t long enough and my neck beard not luxurious enough to be able to figure out the UNIX command do all of that. But, in Windows, it’s very easy for me. Just a couple of ‘net use’, some ‘copy’ commands and my new favorite, rasdial. Oh how I’m now a huge fan of rasdial.
On the Mac, besides not knowing how to start and stop a VPN session using the command line, I also (still) have no idea how to mount drives from the command line. One of these days I will look that up.
Finally, I have automated file transfer again. Now I shall sleep and finish the last 3 tomorrow night.
3 Responses to “Yea, but in Windows I can…”
Leave a Reply
Comment moderation in full effect!
All comments at donburnside.com are moderated by my first rate team of robot warriors, ready to do battle with all the nare-do-wells that stalk the interwebs!
Besides, it's only your first comment (per IP address if you are commenting from work and home) that the robot warriors have to approve. After that it should be clear saling! If not, contact db and I'm sure he'll hook you up.
Finally, for those of you in the know, Markdown is available as it a very small set of HTML tags. If you are scratching your head, don't worry, it's just geek stuff. You can still comment!
Thanks for stopping by!








April 19th, 2008 at 10:57 am
heh, I could write this but swap Windows and Mac. It’s all about what you know!
btw, ‘man mount’ will give you advice on mounting dem drives.
April 19th, 2008 at 1:30 pm
Hehe. “man mount”. Unix am funny.
April 21st, 2008 at 1:34 pm
think an automator action could keep up with that? jus’ sayin.