![]() |
PCDVD數位科技討論區
(https://www.pcdvd.com.tw/index.php)
- 七嘴八舌異言堂
(https://www.pcdvd.com.tw/forumdisplay.php?f=12)
- - 如何只複製出資料夾結構而不要內容且能防寫?
(https://www.pcdvd.com.tw/showthread.php?t=1098162)
|
|---|
如何只複製出資料夾結構而不要內容且能防寫?
例如有500個含內容資料夾,只想要複製一份資料夾結構而不要內容,且複製出來的資料夾
再由原500個做複製貼上能夠避免資料夾內容寫入。 請問有沒有批次檔或freeware能達成的 :confused: |
用Windows指令XCopy就可以
http://edisonshih.pixnet.net/blog/p...%8C%87%E4%BB%A4 防寫是指設唯讀嗎?若是,複製完再設就好 也可用Attrib指令批次處理 http://changyang319.pixnet.net/blog...ren,type,attrib |
權限的話可以事後iCacls.exe 或 Cacls.exe (NTFS)
xcopy /t /e "C:\Your Folder" "C:\New Folder" /t = Copies the subdirectory structure, but not the files /e = Copies subdirectories, including any empty ones |
結構可以用xcopy
xcopy 來源\*.1 目的 /E 指定一個copy不存的副檔名,但空目錄也要copy |
感謝,目前看下來要連空目錄都複製就是用/t /e
要防寫就複製完後全選設唯讀屬性,這應該就是最快的方式了!? |
引用:
試了一下"來源\*.1"的方式滿好用的,但不曉得為什麼沒加/T的話速度慢很多 :confused: 現在比較困擾的是,全部資料夾設成唯讀後,再丟一樣的資料夾進去就又蓋掉唯讀的資料夾了 :cry: 這樣還是會寫入啊 :stupefy: |
NTFS File and Folder Advanced Permissions :confused:
|
| 所有的時間均為GMT +8。 現在的時間是04:56 AM. |
vBulletin Version 3.0.1
powered_by_vbulletin 2025。