'Robocopy grabbing just the google chrome bookmarks files

robocopy \\$OldComputername\C$\Users\$Username\Appdata\Local\Google\Chrome\"User Data"\Default \\$NewComputerName\C$\Temp\$Username\Appdata\Local\Google\Chrome\"User Data"\Default

So the rest of my robocopy script works wonders, everything is perfect however i am trying to specifically copy over the bookmark files for google chrome. Where i am stuck is there are 2 files, one is bookmarks.bak, the other is bookmarks.??? The 2nd file doesn't seem to have an extension, and is needed to migrate bookmarks. What can i do to include this file in this robocopy line? i tried \Default\Bookmarks*.* as someone suggested but it doesn't seem to work.



Solution 1:[1]

I had an issue with this when trying to backup customers' sales guys Chrome bookmarks to OneDrive to transfer to their new laptops. On the old laptop, I put this in a batch file and ran as administrator:

copy "%localappdata%\Google\Chrome\User Data\Default\Bookmarks" "%userprofile%\OneDrive - CompanyFolderName\ChromeBookmarks.exp"

This copies the bookmarks file but adds an 'exp' extension to it (I used 'exp' for 'export'). When the file had synced through OneDrive onto the new laptop, I ran the following in a batch file to import it:

copy "%userprofile%\OneDrive - CompanyFolderName\ChromeBookmarks.exp" "%localappdata%\Google\Chrome\User Data\Default\Bookmarks"

This copies the bookmarks.exp file back and removes the 'exp' extension. Remember to change the 'OneDrive - CompanyFolderName' if you specifically use this example.

Not sure if the extension addition is necessary if just using the Copy command, but it can help you use Robocopy to move the file around if you need to before restoring it and removing the extension again.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 UKBITS Ltd