The copy Command Prompt hais kom duplicates ib cov ntaub ntawv, khaws cov ntawv thib ob hauv qhov chaw sib txawv ntawm koj xaiv.
Siv cov lus txib kom luam cov ntaub ntawv siv nws lub npe tshwj xeeb thiab cov ntaub ntawv txuas ntxiv lossis siv daim ntawv qub los luam cov pab pawg ntawm cov ntaub ntawv ib zaug, tsis hais cov npe ntawm cov ntaub ntawv lossis txuas ntxiv. Qee lwm txoj kev xaiv muaj xws li kev txheeb xyuas tias cov ntaub ntawv tau theej raug thiab txwv tsis pub cov lus ceeb toom los sau cov ntaub ntawv tib lub npe.
Copy Command Availability
Cov lus txib yog muaj nyob rau hauv qhov Command Prompt hauv Windows 11, Windows 10, Windows 8, Windows 7, Windows Vista, thiab Windows XP, nrog rau los ntawm Advanced Startup Options thiab System Recovery Options kho / rov qab menus.
Qhov muaj qee qhov kev hloov pauv hloov pauv thiab lwm yam kev hais kom ua syntax yuav txawv ntawm kev khiav haujlwm mus rau kev ua haujlwm.
Copy Command Syntax
Cov lus txib lees txais daim ntawv dav dav hauv qab no:
copy [ /d] [ /v] [ / n] [ /y | /-y] [ /z] [ /l] [ /a | /b] qhov chaw [ /a | /b] [ + source [ /a | /b] [ + …] [destination [ /a | /b] [ /?
Saib Yuav Ua Li Cas Nyeem Command Syntax yog tias koj tsis paub meej tias yuav txhais li cas cov ntawv theej cov lus txib raws li tau piav qhia saum toj no lossis hauv cov npe hauv qab no.
Copy Command Options | |
---|---|
piav qhia | |
Tso cai rau cov ntaub ntawv lo lus tsim los tsim decrypted. | |
/v | Qhia tias cov ntaub ntawv tshiab sau tau raug. |
Siv lub npe luv luv, yog tias muaj, thaum luam cov ntaub ntawv nrog lub npe tsis yog 8dot3. | |
/y | Suppresses confirmation prompts overwrite the destination file if it's the same name as the source file. |
/-y | Qhia kev lees paub kom tshaj sau cov ntaub ntawv yog tias cov ntaub ntawv lub npe zoo ib yam rau lub npe cov ntaub ntawv lo lus. |
/z | Luam cov ntaub ntawv hauv network hauv hom rov pib dua. |
/l | Luam qhov txuas mus rau qhov chaw es tsis txhob ntawm cov ntaub ntawv tiag tiag uas qhov chaw taw qhia rau. Qhov no tsuas yog cuam tshuam yog tias qhov chaw yog lub cim txuas. |
Qhia cov ntawv ASCII. | |
/b | Qhia cov ntaub ntawv binary. |
source | Nov yog qhov chaw thiab lub npe ntawm cov ntaub ntawv koj xav luam tawm. Lub hauv paus tej zaum yuav tsis yog ib daim nplaub tshev thiab koj yuav tsis siv cov cim wildcard (lub hnub qub). |
destination | Nov yog qhov chaw nyob thiab/los yog cov ntaub ntawv npe uas cov ntaub ntawv teev tseg hauv qhov chaw yuav tsum tau theej rau. |
/? | Siv cov kev pab hloov nrog cov ntawv luam los qhia cov ncauj lus kom ntxaws txog cov lus txib ob peb xaiv. |
Ntxiv cov ntaub ntawv los ntawm kev xaiv ntau cov ntaub ntawv tab sis tsuas yog ib daim ntawv lo xwb.
Copy Command Piv txwv
Hauv qab no yog ob peb yam piv txwv ntawm kev siv cov ntawv luam:
Copy mus rau ib tug txawv Folder
copy Z:\Software\program.iso C:\Users\Jon\Downloads\Programs\
Cov ntawv theej program.iso los ntawm Z: tsav mus rau tus neeg siv lub Program folder.
Copy and Rename
copy Y:\install\j93n.exe Y:\more\m1284.msi
Koj tuaj yeem siv cov ntawv luam kom hloov npe cov ntaub ntawv thiab txawm hloov nws cov ntaub ntawv txuas ntxiv. Hauv qhov piv txwv no, cov ntaub ntawv j93n.exe tau theej rau lub nplaub tshev tshiab ntawm Y: tsav li m1284.msi.
Qhov no tsis yog cov txheej txheem hloov pauv cov ntaub ntawv (piv txwv li, cov ntaub ntawv EXE tsis tau hloov dua siab tshiab rau MSI) tab sis hloov txoj hauv kev los ua cov ntawv luam zoo ib yam tab sis nrog cov ntaub ntawv lo lus uas tau khaws tseg hauv lub npe txawv thiab sab hauv. txawv folder.
copy D:\i386\atapi.sy_ C:\Windows\atapi.sys
Hauv qhov piv txwv saum toj no, cov ntaub ntawv atapi.sy_, nyob hauv i386 nplaub tshev ntawm Windows XP installation CD, tau theej rau C:\Windows directory li atapi.sys.
Tsis zoo li Y: tsav piv txwv saum toj no, qhov no yog qhov tseeb me ntsis, txij li kev luam cov ntaub ntawv zoo li ntawd los ntawm disc yog ib qho kev coj ua thaum kho qee qhov teeb meem Windows.
Copy rau Txoj Kev Tam Sim No
copy D:\readme.htm
Hauv qhov piv txwv no, cov lus txib luam tawm tsis muaj lub ntsiab lus tau teev tseg, yog li cov ntaub ntawv readme.htm tau theej rau txhua daim ntawv teev npe uas koj tau ntaus cov lus txib los ntawm.
Piv txwv li, yog tias koj ntaus ntawv d:\readme.htm los ntawm C:\Windows> kom sai, cov ntaub ntawv HTM yuav raug theej rau C:\Windows.
Copy Tsuas yog qee hom ntaub ntawv
copy /y /v C:\Users\Jon\Downloads\.mp3 C:\Users\Jon\Music\DownloadedMusic\
Qhov kev hais kom ua no luam tag nrho MP3s (.mp3) los ntawm Downloads nplaub tshev mus rau Music\DownloadedMusic\ nplaub tshev, tab sis peb xav kom paub tseeb tias txhua cov ntaub ntawv tau theej, txawm tias twb muaj ib qho hauv DownloadedMusic nrog tib lub npe. (/y). Peb mam li txheeb xyuas daim ntawv theej (/v) kom paub tseeb tias Command Prompt qhia peb seb cov ntaub ntawv puas tau theej lossis yog qhov yuam kev tshwm sim hauv tus txheej txheem.
Ib daim nplaub tshev yuav tsum muaj nyob rau hauv qhov chaw nyob ua ntej daim ntawv txib yuav luam cov ntaub ntawv rau nws. Ua cov folders tshiab hauv Command Prompt nrog rau mkdir hais kom ua.
Merge Files into One
copy Z:\file1.txt+Z:\file2.txt+Z:\file3.txt Z:\combined.txt
Qhov no yuav muab peb TXT cov ntaub ntawv rau hauv ib qho tshiab hu ua ua ke.txt. Raws li koj tuaj yeem pom, txhua cov ntaub ntawv uas yuav tsum yog ib feem ntawm kev sib koom ua ke yuav tsum tau sib cais los ntawm ib qho + kos npe, tab sis tsis muaj qhov chaw.
Koj tuaj yeem siv lub hnub qub los ntxiv ntau cov ntaub ntawv. Yog li, hauv peb qhov piv txwv, peb tuaj yeem hloov tag nrho cov.txt piv txwv nrog Z:\.txt, tab sis tsuas yog tias peb xav ua ke txhua txhua TXT cov ntaub ntawv los ntawm Z: tsav.
Copy Related Commands
Cov lus txib no zoo ib yam li xcopy hais kom ua, tab sis tsis zoo li daim ntawv theej, xcopy ua haujlwm ntawm cov folders, ib yam nkaus.