If you have a very important document that you’ve been spending weeks, months, years, or even a decade on, you might want to back it up. No, you WANT to back it up.
Maybe you have saved extra copies, maybe you’ve backed it up so many times in so many places that you get confused as to where the current one is, what naming convention you use, and which flash drive actually has a copy from six months ago that you’d like to pull up again because that’s when you deleted a few pages that you really want to reincorporate.
This post, and the batch script below is for students, writers, and the like.
To get started you’ll need a Windows machine, a Dropbox account with the desktop app installed, a Google Drive account with the desktop app installed, and an external or network attached hard drive.
If you don’t have all of those, or if you have a different set-up, that’s okay, just modify the code below to fit your needs. By running the script “as is” it will copy a current, working copy to Google Drive, Dropbox, and attached storage device as well as a dated (with a date in the file name) archive copy that you can easily call back up if needed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
@echo off REM ************************************************** REM * Single Document Back-Up REM * Chad Leigh Kluck - chadkluck.net REM * February 10, 2016 REM ************************************************** REM ************************************************** REM * SET CUSTOM VARIABLES REM * We set variable to name the source and archive REM * REM * docExt=[the extension of the doc] REM * docName=[the name without the extention] REM ************************************************** set docExt=.docx set docName=MyNovel set sourceCopy=\\drobo\Documents\Chad\%docName%%docExt% set archiveGoogle=%USERPROFILE%\Google Drive\Archive\ set archiveDropBox=%USERPROFILE%\Dropbox\Archive\ set archiveDrobo=\\drobo\Documents\Chad\Archive\ REM ************************************************** REM * END CUSTOM VARIABLES REM ************************************************** REM * Formulate the name of the archive document "MyNovel 2016-02-16.docx" set archiveName=%docName% %date:~-4,4%-%date:~-10,2%-%date:~-7,2%%docExt% set fullDocName=%docName%%docExt% echo. echo Saving current copy and dated archive copy to Google Drive... COPY /V /Y /Z "%sourceCopy%" "%archiveGoogle%%fullDocName%" COPY /V /Y /Z "%sourceCopy%" "%archiveGoogle%%archiveName%" echo. echo Saving current copy and dated archive copy to NAS... COPY /V /Y /Z "%sourceCopy%" "%archiveDrobo%%fullDocName%" COPY /V /Y /Z "%sourceCopy%" "%archiveDrobo%%archiveName%" echo. echo Saving current copy and dated archive copy to Dropbox... COPY /V /Y /Z "%sourceCopy%" "%archiveDropBox%%fullDocName%" COPY /V /Y /Z "%sourceCopy%" "%archiveDropBox%%archiveName%" echo. pause |
Just change the file paths to reflect your own, save it in a “archive-this.bat”, place in the same directory your document or on your desktop so you never forget, and you’re set with local and off-site (cloud) archives!
You’ll notice that I list \\Drobo as my Network Attached Storage, this could just as easily be C:\
Have fun and remember, this should be used in conjunction with regularly scheduled, automatic on and off-site back-ups!
I enjoy comments and feedback. Let me know if you have anything to share with me like stories, pictures, or other media. You can also contact me directly via the contact form. I'd love to hear from you!