|
zorsite
新手上路

积分 12
发帖 9
注册 2006-3-17
状态 离线
|
『楼 主』:
Dos下如何创建有空格的文件夹?
使用 LLM 解释/回答一下
在网上看到有人做了个C盘资料转移器。其实现原理是这样:
压缩文件内有temp,oe,my documents,favorites,desktop这五个文件夹。自解压时将这五个文件夹解至d:\personal。然后用一个bat文件调用xcopy命令将C盘对应各文件夹的内容全部拷贝过来。最后再用reg文件,将注册表内对应的文件路径改为d:\personal下的各文件夹。
REGEDIT4
"Cache"="D:\\Personal\\Temporary Internet Files"
"Desktop"="D:\\Personal\\Desktop"
"Favorites"="D:\\Personal\\Favorites"
"Personal"="D:\\Personal\\My Documents"
"My Music"="D:\\Personal\\My Documents\\My Pictures"
"My Pictures"="D:\\Personal\\My Documents\\My Pictures"
"Recent"="D:\\Personal\\Recent"
"Cache"="D:\\Personal\\Temporary Internet Files"
"Desktop"="D:\\Personal\\Desktop"
"My Music"="D:\\Personal\\My Documents\\My Pictures"
"My Pictures"="D:\\Personal\\My Documents\\My Pictures"
"Favorites"="D:\\Personal\\Favorites"
"Personal"="D:\\Personal\\My Documents"
"Recent"="D:\\Personal\\Recent"
"Store Root"="D:\\Personal\\Outlook Express"
"Desktop"="D:\\Personal\\Desktop"
"Cache"="D:\\Personal\\My Documents"
"Download Directory"="D:\\Personal\\My Documents"
"TEMP"="D:\\Personal\\Temp"
"TMP"="D:\\Personal\\Temp"
bat:
@echo off
rem 以下命令加了参数/s 后,在导入注册表时不用确认。
echo 正在安装...
regedit.exe /s shell.reg
if exist c:\windows\system\Dxdiag.exe goto 98
xcopy C:\Docume~1\%USERNAME%\Mydocu~1\*.* D:\Personal\Mydocu~1\ /e /y
xcopy C:\Docume~1\%USERNAME%\Desktop\*.* D:\Personal\Desktop\ /e /y
xcopy C:\Docume~1\%USERNAME%\桌面\*.* D:\Personal\Desktop\ /e /y
xcopy C:\Docume~1\%USERNAME%\Favori~1\*.* D:\Personal\Favori~1\ /e /y
goto end
:98
xcopy C:\Mydocu~1\*.* D:\Personal\Mydocu~1\ /e /y
xcopy C:\WINDOWS\Desktop\*.* D:\Personal\Desktop\ /e /y
xcopy C:\WINDOWS\Favori~1\*.* D:\Personal\Favori~1\ /e /y
:end
del D:\Personal\Shell.reg >nul
del %0
echo 安装完毕!
我曾尝试用md命令来创建上述文件,可是发现无法创建"MY documents""My pictures""My Music"这样的中间有空格的文件夹。以前也有遇到过这样的问题,比如我用批处理删除文件时,如果文件名包含有空格的话就无法正确删除。请问这种问题应该怎么处理?
--------------------------------------------------------------------------------------------------------
在压缩文件注解中作者还有这么一段话:打开OE,找到工具--选项--维护--存储文件夹,单击“更改”,将存储位置的路径改为D:\Personal\OE 这样以后用一键还原精灵还原系统时就不用备份这些文件夹里的文件了。
对于这一步操作有没有办法可以通过注册表东批处理来实现?
----------------------------------------------------------------------------------------------------------
Last edited by zorsite on 2006-11-9 at 12:27 AM ]
I saw online that someone made a C drive data transfer tool. The realization principle is like this:
There are five folders in the compressed file: temp, oe, my documents, favorites, desktop. When self-extracting, these five folders are extracted to d:\personal. Then a bat file is used to call the xcopy command to copy all the contents of the corresponding folders on the C drive over. Finally, a reg file is used to change the corresponding file paths in the registry to the folders under d:\personal.
REGEDIT4
"Cache"="D:\\Personal\\Temporary Internet Files"
"Desktop"="D:\\Personal\\Desktop"
"Favorites"="D:\\Personal\\Favorites"
"Personal"="D:\\Personal\\My Documents"
"My Music"="D:\\Personal\\My Documents\\My Pictures"
"My Pictures"="D:\\Personal\\My Documents\\My Pictures"
"Recent"="D:\\Personal\\Recent"
"Cache"="D:\\Personal\\Temporary Internet Files"
"Desktop"="D:\\Personal\\Desktop"
"My Music"="D:\\Personal\\My Documents\\My Pictures"
"My Pictures"="D:\\Personal\\My Documents\\My Pictures"
"Favorites"="D:\\Personal\\Favorites"
"Personal"="D:\\Personal\\My Documents"
"Recent"="D:\\Personal\\Recent"
"Store Root"="D:\\Personal\\Outlook Express"
"Desktop"="D:\\Personal\\Desktop"
"Cache"="D:\\Personal\\My Documents"
"Download Directory"="D:\\Personal\\My Documents"
"TEMP"="D:\\Personal\\Temp"
"TMP"="D:\\Personal\\Temp"
bat:
@echo off
rem The following command has the /s parameter added, so there is no need to confirm when importing the registry.
echo Installing...
regedit.exe /s shell.reg
if exist c:\windows\system\Dxdiag.exe goto 98
xcopy C:\Docume~1\%USERNAME%\Mydocu~1\*.* D:\Personal\Mydocu~1\ /e /y
xcopy C:\Docume~1\%USERNAME%\Desktop\*.* D:\Personal\Desktop\ /e /y
xcopy C:\Docume~1\%USERNAME%\桌面\*.* D:\Personal\Desktop\ /e /y
xcopy C:\Docume~1\%USERNAME%\Favori~1\*.* D:\Personal\Favori~1\ /e /y
goto end
:98
xcopy C:\Mydocu~1\*.* D:\Personal\Mydocu~1\ /e /y
xcopy C:\WINDOWS\Desktop\*.* D:\Personal\Desktop\ /e /y
xcopy C:\WINDOWS\Favori~1\*.* D:\Personal\Favori~1\ /e /y
:end
del D:\Personal\Shell.reg >nul
del %0
echo Installation completed!
I once tried to use the md command to create the above files, but found that I couldn't create folders with spaces in the middle like "MY documents", "My pictures", "My Music". I also encountered such problems before, for example, when I used batch processing to delete files, if the file name contained spaces, it couldn't be deleted correctly. How should this problem be dealt with?
--------------------------------------------------------------------------------------------------------
The author also has such a passage in the compressed file annotation: Open OE, find Tools - Options - Maintenance - Storage Folder, click "Change", and change the path of the storage location to D:\Personal\OE. In this way, when using OneKey Ghost to restore the system later, there is no need to back up the files in these folders.
Is there a way to realize this operation through the registry or batch processing?
----------------------------------------------------------------------------------------------------------
Last edited by zorsite on 2006-11-9 at 12:27 AM ]
|
|
2006-11-9 00:17 |
|
|
jasonwang
初级用户
 
积分 122
发帖 54
注册 2006-11-3
状态 离线
|
|
2006-11-9 00:53 |
|
|
不得不爱
超级版主
         我爱DOS
积分 5310
发帖 2044
注册 2005-9-26 来自 四川南充
状态 离线
|
|
2006-11-9 01:41 |
|
|
electronixtar
铂金会员
      
积分 7493
发帖 2672
注册 2005-9-2
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
版主们行动下啊,这样的问题被问了何止千百遍啊,做个FAQ多好啊
Moderators, take action. Such questions have been asked countless times. Why not make a FAQ?
|

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'>" |
|
2006-11-9 04:07 |
|
|
voiL
中级用户
  
积分 384
发帖 189
注册 2005-10-19
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
同意electronixtar兄的说法,论坛最好有专人负责每隔一段时间整理一篇FAQ.
Agree with what brother electronixtar said. The forum should preferably have someone in charge of compiling a FAQ every once in a while.
|
|
2006-11-9 11:41 |
|
|
llgg001
初级用户
 
积分 32
发帖 13
注册 2006-10-30
状态 离线
|
|
2006-11-12 04:56 |
|
|
zhangxl0451
新手上路

积分 2
发帖 1
注册 2006-10-9
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
我是新手,不知道你的用意,但是这样可以创建有空格的目录
例如:md aaa按住alt,然后按小键盘的255,松开手,,回车确认
则建立一个"aaa "的目录.
记得这个办法在dos时代做简单的加密.在同一路径下能够建立两个看似相同的目录.
但到了图形界面下就不好使了.
I'm a newbie, don't know your intention, but this can create a directory with spaces. For example: md aaa hold down alt, then press the numeric keypad 255, release the hand, then press enter to confirm. Then a directory "aaa " is created. Remember this method was used for simple encryption in the DOS era. Two seemingly identical directories can be created under the same path. But it doesn't work well in the graphical interface.
|
|
2006-11-12 20:11 |
|