是否可以将文件从文件夹复制到启用了只读属性的其他文件夹?我的意思是目标文件夹是只读的。
由于
答案 0 :(得分:1)
是的,这可以在Windows 7上实现......
REPRO:
>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
答案 1 :(得分:0)
使用/ R覆盖只读,如下所示:
xcopy /R <source> <destination>