Jumat, 25 November 2011

Tidak termasuk file dan folder

A useful feature of Xcopy is the ability to exclude certain files and/or folders from being copied by means of the "/Exclude" switch. Sebuah fitur yang berguna dari Xcopy adalah kemampuan untuk mengecualikan file tertentu dan / atau folder dapat disalin dengan cara switch "/ Kecualikan". All names containing a given string of characters can be excluded. Semua nama yang mengandung string tertentu dari karakter dapat dikecualikan. Unfortunately, Microsoft's description of the switch is not a model of clarity. Sayangnya, deskripsi Microsoft switch bukan model kejelasan. In fact, postings on the Internet indicate considerable confusion exists about how to implement this handy feature. Bahkan, posting di Internet menunjukkan ada kebingungan tentang bagaimana untuk mengimplementasikan fitur ini berguna. Perhaps the list below will help clarify how to use it. Mungkin daftar di bawah ini akan membantu menjelaskan bagaimana menggunakannya.
   1. The strings contained in the names of the files and/or folders to be excluded from being copied are not entered directly in the command switch itself. String yang terkandung dalam nama file dan / atau folder yang akan dikecualikan dari disalin tidak dimasukkan langsung dalam perintah switch itu sendiri.
   2. The entry in the command switch is one or more text files that list the strings to be excluded. Entri di saklar perintah adalah file teks satu atau lebih yang daftar string untuk dikecualikan.
   3. The format of the switch is /Exclude:{path}list_of_exclusions.txt Note the colon between Exclude and the name of the file that lists the exclusions. Format switch /Exclude:{path}list_of_exclusions.txt Perhatikan usus antara Kecualikan dan nama dari file yang berisi daftar pengecualian. Although more than one exclusion file can be used, stick with one if you can. Meskipun lebih dari satu file pengecualian dapat digunakan, tetap dengan satu jika Anda bisa.
   4. The name of the file that lists exclusions cannot have spaces. Nama file yang berisi daftar pengecualian tidak dapat memiliki spasi. Quoting does not help. Mengutip tidak membantu.
   5. Be careful with pathnames. Hati-hati dengan nama path. Remember that operations are relative to the working directory for the command prompt. Ingat bahwa operasi relatif ke direktori kerja untuk perintah prompt. I suggest placing the exclusion list in the top directory of the directories being copied and opening the command prompt in the directory just above the directory and sub-directories to be copied. Saya sarankan menempatkan daftar pengecualian dalam direktori atas direktori disalin dan membuka command prompt di direktori di atas direktori dan sub-direktori yang akan disalin. ( Go here if you don't know how to open the command prompt wherever you want.) The various relative paths will then be simple. ( Buka di sini jika Anda tidak tahu bagaimana untuk membuka command prompt mana pun Anda inginkan.) Jalan berbagai relatif kemudian akan sederhana. If you open the command prompt in the default location, things can get complicated. Jika Anda membuka command prompt di lokasi default, hal-hal yang bisa rumit.
   6. The structure of the exclusions list is one exclusion string per line. Struktur dari daftar pengecualian adalah salah satu pengecualian string yang per baris. Wildcards are not used and do not work. Wildcard tidak digunakan dan tidak bekerja. If you want to exclude all files whose names contain ABC, simply place ABC on one line of the exclusion file. Jika Anda ingin mengecualikan semua file yang berisi ABC, cukup tempatkan ABC pada satu baris dari file pengecualian. If it is being used together with the switch "/S", the exclusion file will apply to sub-directories as well as the main directory. Jika digunakan bersama-sama dengan tombol "/ S", file pengecualian akan berlaku untuk sub-direktori serta direktori utama.
   7. To exclude a particular sub-directory, place its name in the exclusion file with backward slashes before and after its name, viz. , \excluded_directory\ Untuk mengecualikan sebuah sub direktori-tertentu, nama tempat dalam file pengecualian dengan garis miring ke belakang sebelum dan sesudah namanya, yaitu., \excluded_directory\
   8. Use a text editor to create exclusion files. Gunakan editor teks untuk membuat file pengecualian. Do not use Microsoft Word or other word processor unless you are careful to create text files. Jangan menggunakan Microsoft Word atau pengolah kata lain kecuali jika Anda berhati-hati untuk membuat file teks. Use ANSI encoding. Menggunakan pengkodean ANSI. When I tried UTF-8 encoding, the file did not work. Ketika saya mencoba pengkodean UTF-8, file tidak bekerja.

Tidak ada komentar:

Posting Komentar

ads