What is the magic code ?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Sebastian42
Posts: 34
Joined: 17 Feb 2017 02:28

What is the magic code ?

#1 Post by Sebastian42 » 14 Nov 2022 08:42

I want to routinely backup Chrome bookmarks to some folder; I want to simplify it by using a batch file.
If I manually go to C:\Users\Joe\AppData\Local\Google\Chrome\User Data\Default\bookmarks,
click on it, select COPY, open the destination, and click on PASTE in its context menu, I have success.
But if I run a batch file with the following code :
copy C:\Users\Joe\AppData\Local\Google\Chrome\User Data\Default\bookmarks C:\Data\Chrome, [where C:\Data\Chrome is the desired destination] it does NOT work.
WHY NOT ? - or more importantly - HOW can I make it work ?

ShadowThief
Expert
Posts: 1160
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: What is the magic code ?

#2 Post by ShadowThief » 14 Nov 2022 09:13

User Data contains a space, so you need to wrap the path in quotes.

Code: Select all

copy "C:\Users\Joe\AppData\Local\Google\Chrome\User Data\Default\bookmarks" C:\Data\Chrome

Sebastian42
Posts: 34
Joined: 17 Feb 2017 02:28

Re: What is the magic code ?

#3 Post by Sebastian42 » 14 Nov 2022 20:57

That solved it - THANK you.

Post Reply