Karena command prompt sering digunakan oleh administrator sistem, banyak perintah yang khusus untuk jaringan dan administrasi. However, the average PC user is not left out; there are some powerful commands for everyday tasks that anybody will find useful. Namun, rata-rata pengguna PC tidak ditinggalkan, ada beberapa perintah yang kuat untuk tugas-tugas sehari-hari bahwa orang akan menemukan berguna. Here we discuss some examples. Disini kita membahas beberapa contoh.
For convenience in the examples below, I will use simple names for files and folders without indicating the full path. Untuk kenyamanan dalam contoh-contoh di bawah ini, saya akan menggunakan nama-nama sederhana untuk file dan folder tanpa menunjukkan path lengkap. Please remember that paths for all commands are relative to the folder indicated in the command prompt itself, unless explicitly indicated otherwise. Harap diingat bahwa path untuk semua perintah adalah relatif ke folder yang ditunjukkan dalam command prompt itu sendiri, kecuali secara eksplisit dinyatakan lain. The default reference folder in Windows XP is usually C:\Documents and Settings\{log-on name}\ . Referensi standar folder di Windows XP biasanya C: \ Documents and Settings \ {log-nama} \. Thus if a reference is made to a file "somefile.txt", the computer assumes you mean C:\Documents and Settings\{log-on name}\somefile.txt . Jadi jika referensi dibuat untuk sebuah file "somefile.txt", komputer menganggap Anda berarti C: \ Documents and Settings \ {log-nama} \ somefile.txt. If what you really want is C:\someotherfolder\somefile.txt , then you must enter the entire name with the correct path. Jika apa yang Anda inginkan adalah C: \ someotherfolder \ somefile.txt, maka Anda harus memasukkan seluruh nama dengan jalan yang benar. Note that paths containing spaces have to be enclosed in quotes.( In Vista/7 the reference is C:\Users|{log-on name}\ or C:\Windows\System32\ , depending on how you open the command prompt.) Perhatikan bahwa jalur yang mengandung spasi harus diapit tanda kutip (Dalam Vista / 7 referensi adalah C: \ Users | {log-on nama} \ atau C:. \ Windows \ System32 \, tergantung pada bagaimana Anda membuka command prompt. )
A convenient way in Windows XP to be able to open the command prompt in a folder of your choice is obtained by installing the Microsoft PowerToy “Command Prompt Here” . Sebuah cara mudah pada Windows XP untuk bisa membuka command prompt dalam folder pilihan Anda diperoleh dengan menginstal Microsoft PowerToy "Command Prompt Here". The right-click context menu will then contain an entry for opening a command prompt in any selected folder. Menu konteks klik kanan maka akan berisi sebuah entri untuk membuka command prompt dalam folder yang dipilih. The accessory can be downloaded here . Aksesori ini dapat didownload di sini . In Windows Vista/7, hold down the Shift key and the right-click context menu will contain an entry, "Open Command Window Here". Pada Windows Vista / 7, tahan tombol Shift dan menu konteks klik-kanan akan berisi sebuah entri, "Buka Command Window Here". Selecting this entry will open a command prompt with the chosen folder as the reference point for commands. Memilih entri ini akan membuka command prompt dengan folder yang dipilih sebagai titik referensi untuk perintah.
Another way to get file names into the command line without having to type a long path is by using drag and drop. Cara lain untuk mendapatkan nama file ke baris perintah tanpa harus mengetikkan jalan panjang adalah dengan menggunakan drag dan drop. Open a command window and enter the command you want with a space after it. Buka jendela perintah dan masukkan perintah yang Anda inginkan dengan spasi setelah itu. Then use Windows Explorer to open the folder containing the file you want to use. Kemudian gunakan Windows Explorer untuk membuka folder yang berisi file yang ingin Anda gunakan. Drag the file over to the command window and drop it. Tarik file ke jendela perintah dan drop. (Drag and drop does not work in Vista but was restored in Win7.) (Drag dan drop tidak bekerja di Vista, tapi dipulihkan di Win7.)
Power deleting with the expanded "Del" command Daya menghapus dengan perintah diperluas "Del"
The delete command “del” now has a switch “/s” that provides for deletions in subfolders. Perintah menghapus "del" sekarang memiliki sebuah saklar "/ s" yang menyediakan untuk penghapusan dalam subfolder. Thus the command del /s myfolder\* will delete all files in myfolder and all files in any subfolders of myfolder . Jadi perintah del /s myfolder\* akan menghapus semua file dalam myfolder dan semua file dalam subfolder dari myfolder. Note the convenient asterisk wildcard “*”, which allows for multiple deletions in a single user operation. Perhatikan tanda bintang wildcard nyaman "*", yang memungkinkan untuk penghapusan beberapa dalam operasi single user. Together with the switch “/s”, a single “del” command can clean out Temp folders and do other useful housekeeping chores. Bersama dengan switch "/ s", satu "del" perintah dapat membersihkan folder Temp dan melakukan pekerjaan rumah tangga lainnya yang berguna. Another switch "/f" will force the deletion of read-only files. Lain beralih "/ f" akan memaksa penghapusan read-only file. If you are sure about what is being deleted, add the “/q” switch to run in quiet mode so you aren't asked if you really want to delete for every single file. Because of its power, this extended del command has to be used carefully. Jika Anda yakin tentang apa yang sedang dihapus, tambahkan "/ q" beralih untuk menjalankan dalam modus tenang sehingga Anda tidak ditanya apakah Anda benar-benar ingin menghapus untuk setiap file tunggal. Karena kekuasaan, ini perintah del diperpanjang harus digunakan dengan hati-hati. Any files deleted this way do not go into the Recycle Bin but are permanently removed. Setiap file yang dihapus dengan cara ini tidak masuk ke Recycle Bin tapi dihapus secara permanen.
To delete only files with a particular extension EXT, use the command del /s myfolder\*.ext Note that this command will delete all files of a particular type in a folder and all its subfolders. Untuk menghapus hanya file dengan ekstensi tertentu EXT, gunakan perintah del /s myfolder\*.ext Perhatikan bahwa perintah ini akan menghapus semua file dari jenis tertentu di folder dan semua subfolder-nya. One example of its use is to get rid of all temporary files with the extension TMP. Salah satu contoh penggunaannya adalah untuk menyingkirkan semua file-file sementara dengan ekstensi TMP.
Enhanced management of folders (directories) Peningkatan pengelolaan folder (direktori)
The command "rmdir" or its twin "rd" are also expanded compared to the old DOS version. Perintah "rmdir" atau kembarannya "rd" juga diperluas dibandingkan dengan versi DOS lama. To remove folders (directories), use “rmdir” (just “rd” will also work). Untuk menghapus folder (direktori), gunakan "rmdir" (hanya "rd" juga akan bekerja). Folders must be empty before they can be deleted. Folder harus kosong sebelum mereka dapat dihapus. However, there is a switch “/s” for deleting subfolders and with this switch files are also deleted. Namun, ada saklar "/ s" untuk menghapus subfolder dan dengan ini beralih file juga akan dihapus. It is like the old command "deltree". Hal ini seperti perintah lama "deltree". The command rd /s myfolder will remove "myfolder" and everything in it. Perintah rd /s myfolder akan menghapus "myfolder" dan segala sesuatu di dalamnya. Adding the switch /q for a "quiet" mode is also possible. Menambahkan switch / q untuk mode "tenang" juga mungkin.
Options have also been added to the command for making folders. Pilihan juga telah ditambahkan ke perintah untuk membuat folder. The command “mkdir” or “md” can now make a whole tree. Perintah "mkdir" atau "md" sekarang dapat membuat seluruh pohon. For example, consider the command md new\new1\new2 This will create a folder “new” with a subfolder “new1” that in turn has a subfolder “new2”. Sebagai contoh, perhatikan perintah md new\new1\new2 Ini akan membuat folder "baru" dengan subfolder "new1" yang pada gilirannya memiliki subfolder "new2".
Xcopy- Powerful and versatile way to copy or back up files Xcopy-Powerfull dan serbaguna cara untuk menyalin atau back up file
For copying large numbers of files or backing up a large folder, the command line is often the fastest and easiest way to go. Untuk menyalin sejumlah besar file atau back up folder yang besar, baris perintah sering cara tercepat dan termudah untuk pergi. The command “xcopy” is a very useful and powerful command for this purpose. Perintah "xcopy" adalah perintah yang sangat berguna dan kuat untuk tujuan ini. (The old DOS also had an “xcopy” command but it sometimes had trouble with long file names. The XP version has no such problems.) “xcopy” comes with an alphabet soup of assorted switches that give it great versatility for use as a file backup utility. (DOS tua juga memiliki "xcopy" perintah tetapi kadang-kadang mengalami kesulitan dengan nama file yang panjang Versi XP tidak memiliki masalah seperti itu..) "Xcopy" dilengkapi dengan sup alfabet berbagai macam switch yang memberikan fleksibilitas besar untuk digunakan sebagai file cadangan utilitas. Enter “xcopy /?” in a command prompt to see them all. Masukkan "xcopy /?" Pada command prompt untuk melihat mereka semua. For example with the switch “/d:[mm-dd-yyy]” only files changed after a given date are copied. Misalnya dengan switch "/ d: [mm-dd-yyy]" hanya file berubah setelah tanggal tertentu yang dapat disalin. A command that will copy all files from the folder myfolder that have changed since June 1, 2003 to the folder mybackup is given by xcopy myfolder mybackup /d:06-01-2003 If no date is specified the switch “/d” will copy all files that have changed at any time.As is true in general, if there are spaces in a name, the path and file name have to be enclosed in quotes. Sebuah perintah yang akan menyalin semua file dari folder myfolder yang telah berubah sejak 1 Juni 2003 untuk folder mybackup diberikan oleh xcopy myfolder mybackup /d:06-01-2003 Jika tidak ada tanggal yang ditentukan switch "/ d" akan menyalin semua file yang telah diubah setiap time.As benar secara umum, jika ada spasi pada nama, path dan nama file harus tertutup dalam tanda kutip. Adding the switch "/s" provides that subfolders and their contents will also be copied. Menambahkan tombol "/ s" menyediakan bahwa subfolder dan isinya juga akan disalin. Other switches provide for read-only and hidden files. Switch lain menyediakan untuk file read-only dan tersembunyi. Altogether, there are something like 27 command line options for xcopy . Secara keseluruhan, ada sesuatu seperti 27 opsi baris perintah untuk xcopy. More information is on this page . Informasi lebih lanjut pada halaman ini .
How to list files with "dir" Cara daftar file dengan "dir"
The "dir" command is not new but it remains one of the most useful for average PC users. Perintah "dir" perintah ini tidak baru tetapi tetap salah satu yang paling berguna untuk pengguna PC rata-rata. If you have ever wanted to make a list of all the files contained in a particular folder, you will have discovered that the Windows GUI provides no easy way to do this. Jika Anda pernah ingin membuat daftar semua file yang terkandung dalam folder tertentu, Anda akan telah menemukan bahwa Windows menyediakan GUI ada cara mudah untuk melakukan ini. It is very straightforward, however, when using the command line. Hal ini sangat mudah, namun, ketika menggunakan baris perintah. The command “dir myfolder” will list the files and folders contained in myfolder . Perintah "dir myfolder" akan daftar file dan folder yang terdapat dalam myfolder. Again, there are switches that provide for various modifications of the command. Sekali lagi, ada switch yang menyediakan berbagai modifikasi dari perintah. For example “/h” will show hidden files and “/s” will list the contents of sub-folders in addition to those of the main folder. Sebagai contoh "/ h" akan menampilkan file tersembunyi dan "/ s" akan daftar isi sub-folder selain yang dari folder utama. Of course, the normal output of the command is to the screen. Tentu saja, output normal perintah adalah untuk layar. To output to a file instead of the screen, the command is dir myfolder >listmyfolder.txt where “>” is the redirection symbol. Untuk output ke file bukan dari layar, perintahnya adalah dir myfolder >listmyfolder.txt mana ">" adalah simbol redirection. The file "listmyfolder.txt" will be created by the command. File "listmyfolder.txt" akan dibuat oleh perintah. Output can also be redirected straight to a printer on the LPT1 port but I think it is better to first create a file and then print from there if hardcopy is desired. Output juga dapat diarahkan langsung ke printer pada port LPT1 tapi saya pikir lebih baik untuk pertama kali membuat file dan kemudian cetak dari sana jika hardcopy diinginkan. These lists can be a lot longer than you might think. Daftar ini dapat jauh lebih lama daripada yang Anda kira. (These days most printers are on USB, anyway.) This use of dir is also available in Windows 98/Me. (Hari-hari ini sebagian besar printer berada di USB, anyway.) Penggunaan dir juga tersedia di Windows 98/Me.
The dir command can also be used to list only files with a given extension. Perintah dir juga dapat digunakan untuk membuat daftar file hanya dengan ekstensi tertentu. For example dir myfolder\*.doc /s >listmyfolder.txt will list all Microsoft Word files in myfolder and its subfolders. Sebagai contoh dir myfolder\*.doc /s >listmyfolder.txt akan menampilkan semua file Microsoft Word di myfolder dan subfolder. This form of the command will also list all the directories and sub-directories. Bentuk perintah juga akan daftar semua direktori dan sub-direktori. If you want a list of filenames only, add the switch /b . Jika Anda ingin daftar nama file saja, tambahkan switch / b. The filename will include the full path. Nama file akan mencakup path lengkap.
Renaming files with "ren" Mengganti nama file dengan "ren"
Renaming aa large number of files can be tedious. Mengganti nama aa sejumlah besar file dapat membosankan. The command ren (also written rename ) is somewhat limited but its ability to use wild cards can sometimes be useful. Ren perintah (juga ditulis nama) adalah agak terbatas namun kemampuannya untuk menggunakan kartu liar kadang-kadang bisa berguna. The basic command is ren file1 file2 The renamed file has to stay in the same folder as the original; this command cannot move files to another folder. Perintah dasar adalah ren file1 file2 nama file harus tinggal dalam folder yang sama seperti aslinya, perintah ini tidak dapat memindahkan file ke folder lain. The wildcard capability can be used to change the extension of all files of a certain type. Kemampuan wildcard dapat digunakan untuk mengubah ekstensi dari semua file dari jenis tertentu. Thus ren *.txt *.doc will rename all text files to have a DOC extension. Jadi ren *.txt *.doc akan mengubah nama semua file teks untuk memiliki ekstensi DOC.
Moving files Memindahkan file
The command "move" takes a file from one folder and puts it in another. Perintah "bergerak" mengambil file dari satu folder dan menempatkan di tempat lain. Its ability to use wild cards makes it useful for moving all the files of a given type to another location. Kemampuan untuk menggunakan kartu liar membuatnya berguna untuk memindahkan semua file dari jenis tertentu ke lokasi lain. A command of the type move /y folder1\*.mp3 folder2\ will move all MP3 files from folder1 to folder2 . Perintah dari tipe move /y folder1\*.mp3 folder2\ akan memindahkan semua file MP3 dari folder1 ke Folder2. The switch " /y" is used if you want to prevent the system from asking if it should overwrite existing files of the same name. Switch "/ y" adalah digunakan jika Anda ingin mencegah sistem dari bertanya apakah itu harus menimpa file yang sudah ada dengan nama yang sama. To prevent overwriting, use the switch "/-y". Untuk mencegah Timpa, gunakan switch "/-y".
Changing file attributes with "attrib" Mengubah atribut file dengan "ATTRIB"
In addition to their actual content, files also have a set of properties that characterize them (sometimes called metadata .) One set of these properties are the four attributes read-only, hidden, system, and archive . Selain konten yang sebenarnya mereka, file juga memiliki seperangkat sifat yang mencirikan mereka (kadang-kadang disebut metadata .) Satu set properti ini adalah empat atribut read-only, tersembunyi, sistem, dan arsip. The archive attribute is primarily used in backup procedures but the other three can be encountered in various contexts. Atribut arsip terutama digunakan dalam prosedur cadangan tapi tiga lainnya dapat ditemui dalam berbagai konteks. These attributes can be turned on or off with the command "attrib" and its switches. Atribut ini dapat diaktifkan atau dinonaktifkan dengan perintah "ATTRIB" dan switch nya. The great utility of this command is that it can act on subfolders with its switch "/s" and can use the wildcard "*". Utilitas yang besar dari perintah ini adalah bahwa ia dapat bertindak pada subfolder dengan switch "/ s" dan dapat menggunakan wildcard "*". For example, to clear the read-only , system, and hidden attributes from a file use attrib -r -s -h somefile This operation is not uncommon when system files have to be edited. Misalnya, untuk menghapus read-only, sistem, dan atribut tersembunyi dari menggunakan file attrib -r -s -h somefile Operasi ini tidak jarang terjadi bila sistem file harus diedit. To restore the attributes the command is attrib +r +s +h somefile A common situation where it is desirable to clear the read-only attribute from many files is when files are copied from a CD. Untuk mengembalikan atribut perintah ini attrib +r +s +h somefile Sebuah situasi umum di mana diinginkan untuk menghapus atribut read-only dari file banyak adalah ketika file akan disalin dari CD. By default CD files are normally marked read-only. Oleh file CD standar biasanya ditandai hanya-baca. This can interfere with editing. Hal ini dapat mengganggu dengan mengedit. To clear the read-only attribute from all files in a folder and its subfolders use attrib -r somefolder\*.* /s If you want to process all files of a certain type such as MP3, use attrib -r somefolder\*.mp3 /s Untuk menghapus atribut read-only dari semua file dalam folder dan subfolder menggunakan attrib -r somefolder\*.* /s Jika Anda ingin memproses semua file dari jenis tertentu seperti MP3, gunakan attrib -r somefolder\*.mp3 /s
How to make your favorite folder easily accessible in Windows dialog boxes Bagaimana membuat folder favorit Anda dengan mudah diakses di kotak dialog Windows
Another older command that I find handy is "subst". Perintah lain yang lebih tua yang saya temukan berguna adalah "subst". There are certain folders that I use over and over and I like to have ready access to them. Ada folder tertentu yang saya gunakan berulang dan saya ingin memiliki akses siap untuk mereka. One way to do this is to use the command “subst” to assign a drive letter to a folder. Salah satu cara untuk melakukan ini adalah dengan menggunakan perintah "subst" untuk menetapkan huruf drive ke folder. Since drives are at the top of My Computer and any folder trees in browse lists, it makes the folder very easy to get to. Karena drive berada di atas pohon My Computer dan folder apapun dalam daftar isi, itu membuat folder sangat mudah untuk sampai ke. To map the “Z:” drive to a folder "myfolder", enter subst z: myfolder Unless you are working from the parent folder of "myfolder" you will need the full path for it. Untuk peta "Z:" drive ke "myfolder" folder, masukkan subst z: myfolder Kecuali Anda bekerja dari folder induk dari "myfolder" Anda akan memerlukan path lengkap untuk itu. The assignment only lasts until the user logs off or the computer is shut down so I have a one-line batch file in my Startup folder that reinstitutes the assignment. Tugas hanya berlangsung sampai pengguna log off atau komputer dimatikan jadi saya memiliki sebuah file batch satu baris dalam folder Startup saya bahwa reinstitutes tugas.
sumber : " comand windows .com"
For convenience in the examples below, I will use simple names for files and folders without indicating the full path. Untuk kenyamanan dalam contoh-contoh di bawah ini, saya akan menggunakan nama-nama sederhana untuk file dan folder tanpa menunjukkan path lengkap. Please remember that paths for all commands are relative to the folder indicated in the command prompt itself, unless explicitly indicated otherwise. Harap diingat bahwa path untuk semua perintah adalah relatif ke folder yang ditunjukkan dalam command prompt itu sendiri, kecuali secara eksplisit dinyatakan lain. The default reference folder in Windows XP is usually C:\Documents and Settings\{log-on name}\ . Referensi standar folder di Windows XP biasanya C: \ Documents and Settings \ {log-nama} \. Thus if a reference is made to a file "somefile.txt", the computer assumes you mean C:\Documents and Settings\{log-on name}\somefile.txt . Jadi jika referensi dibuat untuk sebuah file "somefile.txt", komputer menganggap Anda berarti C: \ Documents and Settings \ {log-nama} \ somefile.txt. If what you really want is C:\someotherfolder\somefile.txt , then you must enter the entire name with the correct path. Jika apa yang Anda inginkan adalah C: \ someotherfolder \ somefile.txt, maka Anda harus memasukkan seluruh nama dengan jalan yang benar. Note that paths containing spaces have to be enclosed in quotes.( In Vista/7 the reference is C:\Users|{log-on name}\ or C:\Windows\System32\ , depending on how you open the command prompt.) Perhatikan bahwa jalur yang mengandung spasi harus diapit tanda kutip (Dalam Vista / 7 referensi adalah C: \ Users | {log-on nama} \ atau C:. \ Windows \ System32 \, tergantung pada bagaimana Anda membuka command prompt. )
A convenient way in Windows XP to be able to open the command prompt in a folder of your choice is obtained by installing the Microsoft PowerToy “Command Prompt Here” . Sebuah cara mudah pada Windows XP untuk bisa membuka command prompt dalam folder pilihan Anda diperoleh dengan menginstal Microsoft PowerToy "Command Prompt Here". The right-click context menu will then contain an entry for opening a command prompt in any selected folder. Menu konteks klik kanan maka akan berisi sebuah entri untuk membuka command prompt dalam folder yang dipilih. The accessory can be downloaded here . Aksesori ini dapat didownload di sini . In Windows Vista/7, hold down the Shift key and the right-click context menu will contain an entry, "Open Command Window Here". Pada Windows Vista / 7, tahan tombol Shift dan menu konteks klik-kanan akan berisi sebuah entri, "Buka Command Window Here". Selecting this entry will open a command prompt with the chosen folder as the reference point for commands. Memilih entri ini akan membuka command prompt dengan folder yang dipilih sebagai titik referensi untuk perintah.
Another way to get file names into the command line without having to type a long path is by using drag and drop. Cara lain untuk mendapatkan nama file ke baris perintah tanpa harus mengetikkan jalan panjang adalah dengan menggunakan drag dan drop. Open a command window and enter the command you want with a space after it. Buka jendela perintah dan masukkan perintah yang Anda inginkan dengan spasi setelah itu. Then use Windows Explorer to open the folder containing the file you want to use. Kemudian gunakan Windows Explorer untuk membuka folder yang berisi file yang ingin Anda gunakan. Drag the file over to the command window and drop it. Tarik file ke jendela perintah dan drop. (Drag and drop does not work in Vista but was restored in Win7.) (Drag dan drop tidak bekerja di Vista, tapi dipulihkan di Win7.)
Power deleting with the expanded "Del" command Daya menghapus dengan perintah diperluas "Del"
The delete command “del” now has a switch “/s” that provides for deletions in subfolders. Perintah menghapus "del" sekarang memiliki sebuah saklar "/ s" yang menyediakan untuk penghapusan dalam subfolder. Thus the command del /s myfolder\* will delete all files in myfolder and all files in any subfolders of myfolder . Jadi perintah del /s myfolder\* akan menghapus semua file dalam myfolder dan semua file dalam subfolder dari myfolder. Note the convenient asterisk wildcard “*”, which allows for multiple deletions in a single user operation. Perhatikan tanda bintang wildcard nyaman "*", yang memungkinkan untuk penghapusan beberapa dalam operasi single user. Together with the switch “/s”, a single “del” command can clean out Temp folders and do other useful housekeeping chores. Bersama dengan switch "/ s", satu "del" perintah dapat membersihkan folder Temp dan melakukan pekerjaan rumah tangga lainnya yang berguna. Another switch "/f" will force the deletion of read-only files. Lain beralih "/ f" akan memaksa penghapusan read-only file. If you are sure about what is being deleted, add the “/q” switch to run in quiet mode so you aren't asked if you really want to delete for every single file. Because of its power, this extended del command has to be used carefully. Jika Anda yakin tentang apa yang sedang dihapus, tambahkan "/ q" beralih untuk menjalankan dalam modus tenang sehingga Anda tidak ditanya apakah Anda benar-benar ingin menghapus untuk setiap file tunggal. Karena kekuasaan, ini perintah del diperpanjang harus digunakan dengan hati-hati. Any files deleted this way do not go into the Recycle Bin but are permanently removed. Setiap file yang dihapus dengan cara ini tidak masuk ke Recycle Bin tapi dihapus secara permanen.
To delete only files with a particular extension EXT, use the command del /s myfolder\*.ext Note that this command will delete all files of a particular type in a folder and all its subfolders. Untuk menghapus hanya file dengan ekstensi tertentu EXT, gunakan perintah del /s myfolder\*.ext Perhatikan bahwa perintah ini akan menghapus semua file dari jenis tertentu di folder dan semua subfolder-nya. One example of its use is to get rid of all temporary files with the extension TMP. Salah satu contoh penggunaannya adalah untuk menyingkirkan semua file-file sementara dengan ekstensi TMP.
Enhanced management of folders (directories) Peningkatan pengelolaan folder (direktori)
The command "rmdir" or its twin "rd" are also expanded compared to the old DOS version. Perintah "rmdir" atau kembarannya "rd" juga diperluas dibandingkan dengan versi DOS lama. To remove folders (directories), use “rmdir” (just “rd” will also work). Untuk menghapus folder (direktori), gunakan "rmdir" (hanya "rd" juga akan bekerja). Folders must be empty before they can be deleted. Folder harus kosong sebelum mereka dapat dihapus. However, there is a switch “/s” for deleting subfolders and with this switch files are also deleted. Namun, ada saklar "/ s" untuk menghapus subfolder dan dengan ini beralih file juga akan dihapus. It is like the old command "deltree". Hal ini seperti perintah lama "deltree". The command rd /s myfolder will remove "myfolder" and everything in it. Perintah rd /s myfolder akan menghapus "myfolder" dan segala sesuatu di dalamnya. Adding the switch /q for a "quiet" mode is also possible. Menambahkan switch / q untuk mode "tenang" juga mungkin.
Options have also been added to the command for making folders. Pilihan juga telah ditambahkan ke perintah untuk membuat folder. The command “mkdir” or “md” can now make a whole tree. Perintah "mkdir" atau "md" sekarang dapat membuat seluruh pohon. For example, consider the command md new\new1\new2 This will create a folder “new” with a subfolder “new1” that in turn has a subfolder “new2”. Sebagai contoh, perhatikan perintah md new\new1\new2 Ini akan membuat folder "baru" dengan subfolder "new1" yang pada gilirannya memiliki subfolder "new2".
Xcopy- Powerful and versatile way to copy or back up files Xcopy-Powerfull dan serbaguna cara untuk menyalin atau back up file
For copying large numbers of files or backing up a large folder, the command line is often the fastest and easiest way to go. Untuk menyalin sejumlah besar file atau back up folder yang besar, baris perintah sering cara tercepat dan termudah untuk pergi. The command “xcopy” is a very useful and powerful command for this purpose. Perintah "xcopy" adalah perintah yang sangat berguna dan kuat untuk tujuan ini. (The old DOS also had an “xcopy” command but it sometimes had trouble with long file names. The XP version has no such problems.) “xcopy” comes with an alphabet soup of assorted switches that give it great versatility for use as a file backup utility. (DOS tua juga memiliki "xcopy" perintah tetapi kadang-kadang mengalami kesulitan dengan nama file yang panjang Versi XP tidak memiliki masalah seperti itu..) "Xcopy" dilengkapi dengan sup alfabet berbagai macam switch yang memberikan fleksibilitas besar untuk digunakan sebagai file cadangan utilitas. Enter “xcopy /?” in a command prompt to see them all. Masukkan "xcopy /?" Pada command prompt untuk melihat mereka semua. For example with the switch “/d:[mm-dd-yyy]” only files changed after a given date are copied. Misalnya dengan switch "/ d: [mm-dd-yyy]" hanya file berubah setelah tanggal tertentu yang dapat disalin. A command that will copy all files from the folder myfolder that have changed since June 1, 2003 to the folder mybackup is given by xcopy myfolder mybackup /d:06-01-2003 If no date is specified the switch “/d” will copy all files that have changed at any time.As is true in general, if there are spaces in a name, the path and file name have to be enclosed in quotes. Sebuah perintah yang akan menyalin semua file dari folder myfolder yang telah berubah sejak 1 Juni 2003 untuk folder mybackup diberikan oleh xcopy myfolder mybackup /d:06-01-2003 Jika tidak ada tanggal yang ditentukan switch "/ d" akan menyalin semua file yang telah diubah setiap time.As benar secara umum, jika ada spasi pada nama, path dan nama file harus tertutup dalam tanda kutip. Adding the switch "/s" provides that subfolders and their contents will also be copied. Menambahkan tombol "/ s" menyediakan bahwa subfolder dan isinya juga akan disalin. Other switches provide for read-only and hidden files. Switch lain menyediakan untuk file read-only dan tersembunyi. Altogether, there are something like 27 command line options for xcopy . Secara keseluruhan, ada sesuatu seperti 27 opsi baris perintah untuk xcopy. More information is on this page . Informasi lebih lanjut pada halaman ini .
How to list files with "dir" Cara daftar file dengan "dir"
The "dir" command is not new but it remains one of the most useful for average PC users. Perintah "dir" perintah ini tidak baru tetapi tetap salah satu yang paling berguna untuk pengguna PC rata-rata. If you have ever wanted to make a list of all the files contained in a particular folder, you will have discovered that the Windows GUI provides no easy way to do this. Jika Anda pernah ingin membuat daftar semua file yang terkandung dalam folder tertentu, Anda akan telah menemukan bahwa Windows menyediakan GUI ada cara mudah untuk melakukan ini. It is very straightforward, however, when using the command line. Hal ini sangat mudah, namun, ketika menggunakan baris perintah. The command “dir myfolder” will list the files and folders contained in myfolder . Perintah "dir myfolder" akan daftar file dan folder yang terdapat dalam myfolder. Again, there are switches that provide for various modifications of the command. Sekali lagi, ada switch yang menyediakan berbagai modifikasi dari perintah. For example “/h” will show hidden files and “/s” will list the contents of sub-folders in addition to those of the main folder. Sebagai contoh "/ h" akan menampilkan file tersembunyi dan "/ s" akan daftar isi sub-folder selain yang dari folder utama. Of course, the normal output of the command is to the screen. Tentu saja, output normal perintah adalah untuk layar. To output to a file instead of the screen, the command is dir myfolder >listmyfolder.txt where “>” is the redirection symbol. Untuk output ke file bukan dari layar, perintahnya adalah dir myfolder >listmyfolder.txt mana ">" adalah simbol redirection. The file "listmyfolder.txt" will be created by the command. File "listmyfolder.txt" akan dibuat oleh perintah. Output can also be redirected straight to a printer on the LPT1 port but I think it is better to first create a file and then print from there if hardcopy is desired. Output juga dapat diarahkan langsung ke printer pada port LPT1 tapi saya pikir lebih baik untuk pertama kali membuat file dan kemudian cetak dari sana jika hardcopy diinginkan. These lists can be a lot longer than you might think. Daftar ini dapat jauh lebih lama daripada yang Anda kira. (These days most printers are on USB, anyway.) This use of dir is also available in Windows 98/Me. (Hari-hari ini sebagian besar printer berada di USB, anyway.) Penggunaan dir juga tersedia di Windows 98/Me.
The dir command can also be used to list only files with a given extension. Perintah dir juga dapat digunakan untuk membuat daftar file hanya dengan ekstensi tertentu. For example dir myfolder\*.doc /s >listmyfolder.txt will list all Microsoft Word files in myfolder and its subfolders. Sebagai contoh dir myfolder\*.doc /s >listmyfolder.txt akan menampilkan semua file Microsoft Word di myfolder dan subfolder. This form of the command will also list all the directories and sub-directories. Bentuk perintah juga akan daftar semua direktori dan sub-direktori. If you want a list of filenames only, add the switch /b . Jika Anda ingin daftar nama file saja, tambahkan switch / b. The filename will include the full path. Nama file akan mencakup path lengkap.
Renaming files with "ren" Mengganti nama file dengan "ren"
Renaming aa large number of files can be tedious. Mengganti nama aa sejumlah besar file dapat membosankan. The command ren (also written rename ) is somewhat limited but its ability to use wild cards can sometimes be useful. Ren perintah (juga ditulis nama) adalah agak terbatas namun kemampuannya untuk menggunakan kartu liar kadang-kadang bisa berguna. The basic command is ren file1 file2 The renamed file has to stay in the same folder as the original; this command cannot move files to another folder. Perintah dasar adalah ren file1 file2 nama file harus tinggal dalam folder yang sama seperti aslinya, perintah ini tidak dapat memindahkan file ke folder lain. The wildcard capability can be used to change the extension of all files of a certain type. Kemampuan wildcard dapat digunakan untuk mengubah ekstensi dari semua file dari jenis tertentu. Thus ren *.txt *.doc will rename all text files to have a DOC extension. Jadi ren *.txt *.doc akan mengubah nama semua file teks untuk memiliki ekstensi DOC.
Moving files Memindahkan file
The command "move" takes a file from one folder and puts it in another. Perintah "bergerak" mengambil file dari satu folder dan menempatkan di tempat lain. Its ability to use wild cards makes it useful for moving all the files of a given type to another location. Kemampuan untuk menggunakan kartu liar membuatnya berguna untuk memindahkan semua file dari jenis tertentu ke lokasi lain. A command of the type move /y folder1\*.mp3 folder2\ will move all MP3 files from folder1 to folder2 . Perintah dari tipe move /y folder1\*.mp3 folder2\ akan memindahkan semua file MP3 dari folder1 ke Folder2. The switch " /y" is used if you want to prevent the system from asking if it should overwrite existing files of the same name. Switch "/ y" adalah digunakan jika Anda ingin mencegah sistem dari bertanya apakah itu harus menimpa file yang sudah ada dengan nama yang sama. To prevent overwriting, use the switch "/-y". Untuk mencegah Timpa, gunakan switch "/-y".
Changing file attributes with "attrib" Mengubah atribut file dengan "ATTRIB"
In addition to their actual content, files also have a set of properties that characterize them (sometimes called metadata .) One set of these properties are the four attributes read-only, hidden, system, and archive . Selain konten yang sebenarnya mereka, file juga memiliki seperangkat sifat yang mencirikan mereka (kadang-kadang disebut metadata .) Satu set properti ini adalah empat atribut read-only, tersembunyi, sistem, dan arsip. The archive attribute is primarily used in backup procedures but the other three can be encountered in various contexts. Atribut arsip terutama digunakan dalam prosedur cadangan tapi tiga lainnya dapat ditemui dalam berbagai konteks. These attributes can be turned on or off with the command "attrib" and its switches. Atribut ini dapat diaktifkan atau dinonaktifkan dengan perintah "ATTRIB" dan switch nya. The great utility of this command is that it can act on subfolders with its switch "/s" and can use the wildcard "*". Utilitas yang besar dari perintah ini adalah bahwa ia dapat bertindak pada subfolder dengan switch "/ s" dan dapat menggunakan wildcard "*". For example, to clear the read-only , system, and hidden attributes from a file use attrib -r -s -h somefile This operation is not uncommon when system files have to be edited. Misalnya, untuk menghapus read-only, sistem, dan atribut tersembunyi dari menggunakan file attrib -r -s -h somefile Operasi ini tidak jarang terjadi bila sistem file harus diedit. To restore the attributes the command is attrib +r +s +h somefile A common situation where it is desirable to clear the read-only attribute from many files is when files are copied from a CD. Untuk mengembalikan atribut perintah ini attrib +r +s +h somefile Sebuah situasi umum di mana diinginkan untuk menghapus atribut read-only dari file banyak adalah ketika file akan disalin dari CD. By default CD files are normally marked read-only. Oleh file CD standar biasanya ditandai hanya-baca. This can interfere with editing. Hal ini dapat mengganggu dengan mengedit. To clear the read-only attribute from all files in a folder and its subfolders use attrib -r somefolder\*.* /s If you want to process all files of a certain type such as MP3, use attrib -r somefolder\*.mp3 /s Untuk menghapus atribut read-only dari semua file dalam folder dan subfolder menggunakan attrib -r somefolder\*.* /s Jika Anda ingin memproses semua file dari jenis tertentu seperti MP3, gunakan attrib -r somefolder\*.mp3 /s
How to make your favorite folder easily accessible in Windows dialog boxes Bagaimana membuat folder favorit Anda dengan mudah diakses di kotak dialog Windows
Another older command that I find handy is "subst". Perintah lain yang lebih tua yang saya temukan berguna adalah "subst". There are certain folders that I use over and over and I like to have ready access to them. Ada folder tertentu yang saya gunakan berulang dan saya ingin memiliki akses siap untuk mereka. One way to do this is to use the command “subst” to assign a drive letter to a folder. Salah satu cara untuk melakukan ini adalah dengan menggunakan perintah "subst" untuk menetapkan huruf drive ke folder. Since drives are at the top of My Computer and any folder trees in browse lists, it makes the folder very easy to get to. Karena drive berada di atas pohon My Computer dan folder apapun dalam daftar isi, itu membuat folder sangat mudah untuk sampai ke. To map the “Z:” drive to a folder "myfolder", enter subst z: myfolder Unless you are working from the parent folder of "myfolder" you will need the full path for it. Untuk peta "Z:" drive ke "myfolder" folder, masukkan subst z: myfolder Kecuali Anda bekerja dari folder induk dari "myfolder" Anda akan memerlukan path lengkap untuk itu. The assignment only lasts until the user logs off or the computer is shut down so I have a one-line batch file in my Startup folder that reinstitutes the assignment. Tugas hanya berlangsung sampai pengguna log off atau komputer dimatikan jadi saya memiliki sebuah file batch satu baris dalam folder Startup saya bahwa reinstitutes tugas.
Tidak ada komentar:
Posting Komentar