Before diving deep into the world of shell scripting, I had ventured with batch scripting on Windows XP machine. Well, recently I had to format Windows 7 running on Dell Studio laptop.
In doing so, I forgot to keep backup of the browser bookmarks/favorites, even though Chrome/Firefox provide options to export them. However, I had been using IE lately and kept rather few, yet important links bookmarked.So, I rarely cared about backing them up until recently.
Why not Google?
Well, I did few days back and found the following link useful;
As most of the Windows users would be knowing the OS keeps your favorites/bookmarks under following directory structure;
Windows XP – C:\Documents and Settings\<username>\Favorites
Windows 7 – C:\Users\<username>\Favorites
Generally, Windows OS, be it XP or 7, would be installed in C drive, part of partitioned hard disk storage. So, I was wondering why not make use of the other partitions which are least impacted by crashing/formatting of the Operating System.
Also, keeping backup of the folder manually regularly would not be that easy, even though it is.
Why not automate the backup process?
This is what I think should be done (technically), by creating the following batch script;
:: Assuming the system has another partition as E drive cd /d "E:" rmdir /s /q Favorites cd /d "C:\<YOUR-DIRECTORY-STRUCTURE>" xcopy /s /f Favorites "E:\Favorites"
Now, I just have to save it as batch program, keep it on any drive other than the OS drive.
I tested it on Windows 7 and worked well.