China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-02 04:42
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How do I copy Favorites? View 1,640 Replies 6
Original Poster Posted 2006-09-26 03:44 ·  中国 广东 河源 电信
中级用户
★★
Credits 266
Posts 98
Joined 2006-04-21 20:29
20-year member
UID 54223
Gender Male
Status Offline
xcopy /s userproflie\favorites g:\fav
This doesn't work. What should I do?
Floor 2 Posted 2006-09-26 03:47 ·  中国 江苏 苏州 电信
银牌会员
★★★
Credits 1,181
Posts 533
Joined 2006-08-14 12:54
19-year member
UID 60484
Status Offline
Floor 3 Posted 2006-09-26 03:51 ·  中国 湖南 娄底 新化县 电信
银牌会员
★★★
Credits 1,218
Posts 485
Joined 2006-07-21 21:24
20-year member
UID 58987
From 湖南.娄底
Status Offline
The OP forgot the % signs around the variable. Also, the Favorites path contains a space, so you need to put it in quotes too.

xcopy /s "%USERPROFILE%/Favorites" g:\favorites
Floor 4 Posted 2006-09-26 03:55 ·  中国 广东 河源 电信
中级用户
★★
Credits 266
Posts 98
Joined 2006-04-21 20:29
20-year member
UID 54223
Gender Male
Status Offline
Thanks~~ it works now.
Floor 5 Posted 2006-09-26 04:12 ·  中国 广东 河源 电信
中级用户
★★
Credits 266
Posts 98
Joined 2006-04-21 20:29
20-year member
UID 54223
Gender Male
Status Offline
Could a program be written to back up Favorites?
For example, when I open the batch file, it first prompts me for which directory I want to back up Favorites to... (just enter a path.. if it doesn't exist then create it..). After entering it, press Enter once and it copies it over.
How exactly would I write that?
Floor 6 Posted 2006-09-26 04:34 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Actually I use Maxthon, and its Favorites don't have to use the system default one; you can specify another folder as the Favorites folder

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 7 Posted 2006-09-26 06:56 ·  中国 浙江 台州 天台县 电信
管理员
★★★★
DOS非常爱好者
Credits 6,215
Posts 2,601
Joined 2006-01-20 13:00
20-year member
UID 49256
Status Offline
Wouldn't using IE's import/export be more convenient? Do you really need a batch file for this?
This is making a simple problem more complicated.
Forum Jump: