Xcopy en exclude met mappen

Status
Niet open voor verdere reacties.

Master JE

Gebruiker
Lid geworden
20 jun 2008
Berichten
32
hoe kan ik een hele map exclude met xcopy? ik heb nu dit xcopy "C:\Documents and Settings" "d:\Back-up\Documents and Settings" /E /H /R /K /I /Y /Z /Q /Exclude:"C:\Documents and Settings\Administrator\"
maar dan zegt die: Kan bestand niet lezen:"C:\Documents and Settings\Administrator\"

MVG Master_JE
 
probeer volgende eens

xcopy "C:\Documents and Settings" "d:\Back-up\Documents and Settings" /E /H /R /K /I /Y /Z /Q /Exclude:"\Administrator\"
 
oke weer een probleem minder maar nu zecht die fout tijdens parseren

edit: ik was een " vergeten nog steeds het zelfde probleem het maakt iig niet uit of je met of zonder " doet
 
Laatst bewerkt:
Excluding files and folders

A useful feature of Xcopy is the ability to exclude certain files and/or folders from being copied by means of the "/Exclude" switch. All names containing a given string of characters can be excluded. Unfortunately, Microsoft's description of the switch is neither a model of clarity nor accurate. In fact, postings on the Internet indicate considerable confusion exists about how to implement this handy feature. Perhaps the list below will help clarify how to use it.

1. The strings contained in the names of the files and/or folders to be excluded are not entered directly in the command switch itself.
2. The entry in the command switch is one or more text files that list the strings to be excluded.
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. Although more than one exclusion file can be used, stick with one if you can.
4. The name of the file that lists exclusions cannot have spaces. Quoting does not help.
5. Be careful with pathnames. Remember that operations are relative to the working directory for the command 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. (Go here if you don't know how to open the command prompt wherever you want.) The various relative paths will then be simple. If you open the command prompt in the default location, things can get complicated.
6. The structure of the exclusions list is one exclusion string per line. Wildcards are not used and do not work. If you want to exclude all files whose names contain ABC, simply place ABC on one line of the exclusion file. If it is being used together with the switch "/S", the exclusion file will apply to sub-directories as well as the main directory.
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\
8. Use a text editor to create exclusion files. Do not use Microsoft Word or other word processor unless you are careful to create text files. Use ANSI encoding. When I tried UTF-8 encoding, the file did not work.
Bron: http://commandwindows.com/xcopy.htm

Miischien heb je hier wat aan. Zie vooral het gedeelte in vette tekst.
 
Met een backup-programmatje zoals syncback (freeware en NL) kun je dit soort zaken heel goed regelen in een Windows omgeving. Een aanrader ! :thumb:
 
ik heb iets veel beters gevonden robocopy. maar nu wil ik iets wat ik niet kan vinden. ik wil dat alles wat die kopieert niet laat zien. met copy/xcopy bij cmd is dat gewoon /Q maar dat werkt niet bij robocopy iemand enig iedee?
 
ik heb iets veel beters gevonden robocopy. maar nu wil ik iets wat ik niet kan vinden. ik wil dat alles wat die kopieert niet laat zien. met copy/xcopy bij cmd is dat gewoon /Q maar dat werkt niet bij robocopy iemand enig iedee?

Hoezo iets beter ? Hoe weet je dat ?
 
beter dan xcopy bedoel ik want robocopy zit ook in cmd. Hoe je fouten kan onderdrukken? en weet iemand misschien een goed site waar alle commando's en /... staat? van batch script
 
Laatst bewerkt:
Status
Niet open voor verdere reacties.
Steun Ons

Nieuwste berichten

Terug
Bovenaan Onderaan