幾年前寫的小程式,最近要做啟動碟就翻出來玩
看看有沒有朋友可以幫忙測試 <img src="images/smilies/face-grin.png" align="absmiddle" border="0">
原本的目的是寫一個可以和 DOSLFN 合作的 xcopy 工具
但懶的寫太多功能,只實作了最常用的 /s 參數
之前寫完後幾乎沒有測試,所以可能有一些 Bug
使用時(尤其是加了 /M 參數時)要多加小心
參數說明:
CP 來源
來源可有多個,可用萬用符,最後一個參數指定目的
若只有一個參數,則視其為來源,目的為目前目錄,同 DOS 的 COPY
/S 子目錄拷貝
/M 移動檔案(拷貝成功後刪除來源)
/J 結合文件
/D 指定目的為目錄,非文件
/V 檢驗拷貝結果
/Y 不詢問,總是回答 Yes
/N 即使在有長檔名支援的環境下也不使用長檔名
補充說明:
1. 若無 /j 或 /d,且無法判斷目的為文件或目錄時,會出現詢問
2. 長檔名支援需在 Win9x/2K/XP 下或純 DOS 掛載 DOSLFN 或 LFNDOS
3. 指定目的為目錄時,可自動建立不存在的目錄和子目錄
http://zhenlove.com.cn/cndos/fileup/files/cp.zip
Last edited by silveregg on 2007-3-22 at 06:47 PM ]
A small program written a few years ago, recently I dug it out when making a boot disk to play around
See if any friends can help test it :lol:
The original purpose was to write an xcopy tool that can work with DOSLFN
But I was too lazy to write too many functions, only implemented the most commonly used /s parameter
After finishing it before, I hardly tested it, so there may be some bugs
Be careful when using it (especially when adding the /M parameter)
Parameter description:
CP source
There can be multiple sources, wildcards can be used, the last parameter specifies the destination
If there is only one parameter, it is regarded as the source, the destination is the current directory, the same as DOS's COPY
/S Copy subdirectories
/M Move files (delete source after successful copy)
/J Combine files
/D Specify destination as directory, not file
/V Verify copy result
/Y Do not ask, always answer Yes
/N Do not use long filenames even in environments with long filename support
Supplementary instructions:
1. If there is no /j or /d, and it cannot be judged whether the destination is a file or a directory, a prompt will appear
2. Long filename support needs to be under Win9x/2K/XP or pure DOS with DOSLFN or LFNDOS mounted
3. When specifying the destination as a directory, non-existent directories and subdirectories can be automatically created
http://zhenlove.com.cn/cndos/fileup/files/cp.zip
Last edited by silveregg on 2007-3-22 at 06:47 PM ]