是否可以将文件从文件夹复制到启用只读属性的另一个文件夹?我的意思是目标文件夹是只读的。
谢谢
是的,这在 Windows 7 上是可能的......
复制:
>cd \windows
>dir *.ini
Volume in drive C has no label.
Volume Serial Number is xxxxxxx
Directory of C:\Windows
26-04-2008 21:42 25 cdplayer.ini
11-08-2009 22:18 0 iPlayer.INI
10-06-2009 22:36 1.405 msdfmap.ini
22-09-2009 18:00 162 ODBC.INI
31-10-2009 22:35 232 ODBCINST.INI
10-06-2009 23:08 219 system.ini
15-05-2013 21:03 39 vbaddin.ini
13-11-2012 23:18 219 win.ini
8 File(s) 2.301 bytes
0 Dir(s) xxxxxx bytes free
>mkdir c:\xcp
>attrib +R c:\xcp
>attrib c:\xcp
R C:\xcp
>xcopy "*.ini" "c:\xcp"
C:cdplayer.ini
C:iPlayer.INI
C:msdfmap.ini
C:ODBC.INI
C:ODBCINST.INI
C:system.ini
C:vbaddin.ini
C:win.ini
8 File(s) copied
>dir c:\xcp
Volume in drive C has no label.
Volume Serial Number is XXXXXXXX
Directory of c:\xcp
07-10-2013 11:27 <DIR> .
07-10-2013 11:27 <DIR> ..
26-04-2008 21:42 25 cdplayer.ini
11-08-2009 22:18 0 iPlayer.INI
10-06-2009 22:36 1.405 msdfmap.ini
22-09-2009 18:00 162 ODBC.INI
31-10-2009 22:35 232 ODBCINST.INI
10-06-2009 23:08 219 system.ini
15-05-2013 21:03 39 vbaddin.ini
13-11-2012 23:18 219 win.ini
8 File(s) 2.301 bytes
2 Dir(s) xxxxxxxxxxxxx bytes free
使用 /R 覆盖只读如下
xcopy /R <source> <destination>