Remonter

DOS

 

Nom court

Pour obtenir le nom court (8 caractères) d'un fichier sous Windows XP il faut

-aller dans Programmes/Accessoires/Invite Commandes DOS

-aller dans le répertoire désirez

-exécuter la commande

DIR /X

le nom et l'extension courts précède le nom et l'extension longs

 

 

Commandes DOS - Aide

De World-Informatique

http://www.world-informatique.com/software/dos/index.html

 

 

 

attrib Affiche ou modifie des attributs de fichier.
  attrib [+ / - RASH][[lect:] [chemin] fichier][/S /D]
  + Définit un attribut.
  - Efface un attribut.
  R Attribut de fichier en lecture seule.
  A Attribut de fichier archive.
  S Attribut de fichier système.
  H Attribut de fichier caché.
  [Lecteur:][Chemin][NomFichier] Spécifie le ou les fichiers que ATTRIB doit traiter.
  /S Traite les fichiers dans le dossier courant et dans tous les sous-dossiers.
  /D Traite aussi les dossiers.
 
buffer Attribue de la mémoire à un certain nombre de mémoires tampon du disque lors du lancement du système. Vous ne pouvez utiliser cette commande que dans votre fichier CONFIG.SYS.
  buffer=n[,m]
  n Spécifie le nombre de mémoires tampon du disque. La valeur n doit être comprise entre 1 et 99.
  m spécifie le nombre de mémoires tampon du cache secondaire. La valeur n doit être comprise entre 0 et 8.
 
call Appelle un programme de commandes à partir d'un autre programme de commandes sans interrompre le premier.
  call [lecteur:][chemin]fichier [param]
  [lecteur:][chemin]fichier Spécifie l'emplacement et le nom du programme de commandes à appeler, qui doit porter l'extension .BAT.
  [param] Représente tout paramètre de la ligne de commande requis par le programme de commandes.
 
cd Affiche le nom ou change le répertoire en cours.
  cd [lecteur:][chemin][..]
  chdir [lecteur:][chemin][..]
  .. Retourne au répertoire parent
  cd sans paramètres pour afficher le lecteur et le répertoire en cours.
La chaîne du répertoire en cours est convertie pour utiliser la même casse que celle du disque. Donc, CD C:\TEMP fixera en fait le répertoire en cours à C:\Temp si c'est la casse utilisée sur le disque. La commande CHDIR ne traite pas les espaces comme des séparateurs, il faut donc entrer les noms de fichiers long entre " " exemple : cd "\winnt\profiles\NomUtilisateur\programmes\menu démarrer"
 
chkdsk Vérifie un disque et affiche un rapport d'état.
  chkdsk [volume] [/F] [/V] [/R] [/B]
  volume Spécifie la lettre de lecteur (suivie de deux-points),le point de montage ou le nom de volume.
  /F Corrige les erreurs sur le disque.
  /V FAT/FAT32 : affiche les chemin d'accès et nom complets de tous les fichiers du disque.
    Sur NTFS : affiche également les éventuels messages de nettoyage.
  /R Localise les secteurs défectueux et récupère informations lisibles. (implique /F)
  /X Force le démontage préalable du volume si nécessaire. Les handles ouverts vers le volume ne seront alors plus valides (implique /F).
  /I NTFS seulement : vérifie sommairement les entrées d'index.
 
cls efface l'écran
  cls
 
copy Copie un ou plusieurs fichiers sur un autre emplacement.
  copy [/V] [/Y | /-Y] source[+ source] cible
  source Fichier(s) à copier.
  cible Répertoire et/ou nom de fichier cible.
  /V vérifie l'écriture du ou des fichiers cible.
  /Y Supprime la confirmation de remplacement d'un fichier cible existant.
  /-Y Demande une confirmation pour remplacer un fichier cible existant.
Pour concaténer des fichiers, spécifiez un seul fichier cible et plusieurs fichiers source (avec caractères génériques ou fichier1+fichier2+fichier3).
 
country Permet à MS-DOS d'activer divers formats internationaux relatifs aux monnaies, dates, heures, alphabets et séparateurs décimaux, à l'ordre de tri des caractères et aux caractères autorisés dans les noms de fichier. Cette commande ne peut être utilisée que dans le fichier CONFIG.SYS. La commande COUNTRY configure MS-DOS pour qu'il reconnaisse le jeu de caractères et les conventions de ponctuation correspondant aux différentes langues prises en charge par le système.
  COUNTRY=xxx[,[yyy][,[lecteur:][chemin]fichier]]
  xxx Spécifie le code du pays.
  yyy Spécifie la page de codes d'un pays.
  [lecteur:][chemin]fichier Spécifie l'emplacement et le nom du fichier contenant les informations relatives à un pays.
 
date Affiche ou modifie la date.
  date [date]
    Entrez DATE sans paramètres pour afficher la date système et être invité à la modifier. Appuyez sur ENTRÉE pour conserver la même date.
 
del Supprime un ou plusieurs fichiers.
  del [/P] [/F] noms
  erase [/P] [/F] noms
  noms Spécifie une liste d'un ou plusieurs fichiers ou répertoires.Les caractères génériques peuvent être utilisés pour supprimer plusieurs fichiers.
  /P Demande une confirmation avant de supprimer un fichier.
  /F Force la suppression de fichiers en lecture seule.
deltree Supprime un répertoire ainsi que tous ses fichiers et sous-répertoires.
  deltree [/Y] [lecteur:]chemin [[lecteur:]chemin[...]]
  lecteur:chemin Spécifie le nom du répertoire à supprimer. La commande DELTREE supprime tous les fichiers du répertoire spécifié ainsi que tous les sous-répertoires de ce dernier.
  /Y Exécute la commande DELTREE sans vous demander de confirmer la suppression.
 
device Charge en mémoire le gestionnaire de périphérique indiqué. Vous ne pouvez utiliser cette commande que dans le fichier CONFIG.SYS.
  device=[lecteur:][chemin]fichier [dd-param]
  [lecteur:][chemin]fichier Précisent l'emplacement et le nom du gestionnaire de périphérique à charger.
  [dd-param] Indique dans la ligne de commande toute information exigée par le gestionnaire de périphérique.
 
devicehigh Charge le gestionnaire de périphérique spécifié dans la zone de mémoire supérieure. Le chargement d'un gestionnaire de périphérique dans la zone de mémoire supérieure libère de la mémoire conventionnelle pour les autres programmes. Si la mémoire supérieure n'est pas disponible, la commande DEVICEHIGH fonctionne exactement comme la commande DEVICE.
  devicehigh [lecteur:][chemin]fichier [dd-param]
Pour préciser la ou les région(s) de la mémoire dans lesquelle le gestionnaire de périphérique doit être chargé, utilisez la syntaxe suivante:
  devicehigh [[/L:région1[,taillemin.1][;région2[,taillemin.2] [/S]] [lecteur:][chemin]fichier [dd-param]
  /L:région1[,taillemin.1][;région2[,taillemin.2]... Précise la ou les régions de la mémoire dans lesquelles le gestionnaire de périphérique doit être chargé. Par défaut, MS-DOS charge le gestionnaire dans le bloc de mémoire supérieure (UMB) libre le plus important, et fait en sorte que tous les autres UMB soient à la disposition du gestionnaire. Vous pouvez utiliser le commutateur /L pour charger le gestionnaire de périphérique dans une région donnée de la mémoire ou pour indiquer la ou les régions pouvant être utilisées par ce gestionnaire. Pour charger le gestionnaire dans le bloc le plus important présent dans une région donnée de mémoire supérieure, indiquez le numéro de la région à la suite du commutateur /L. Par exemple, pour charger le gestionnaire dans le bloc libre le plus important de la région 4, tapez /L:4. Pour obtenir la liste des zones de mémoire libres, tapez MEM /F au niveau de l'invite. Lorsqu'un gestionnaire de périphérique est chargé avec le commutateur /L, il peut utiliser uniquement la région de mémoire indiquée. Certains gestionnaires utilisent plusieurs zones de mémoire: dans ce cas, il est possible de spécifier plusieurs régions. Pour savoir comment un gestionnaire de périphérique donné utilise la mémoire, tapez la commande MEM /M et spécifiez son nom en tant qu'argument. Pour indiquer deux régions ou davantage, vous devez séparer les numéros de bloc par des points-virgules (;). Par exemple, pour utiliser les blocs 2 et 3, tapez /L:2;3.Normalement, MS-DOS ne charge le gestionnaire dans un UMB de la région indiquée que si cette dernière contient un UMB plus important que la taille du gestionnaire une fois chargé (normalement égale à celle du fichier programme exécutable). Si le gestionnaire nécessite, lors de son exécution, une quantité de mémoire supérieure à celle qu'il requiert lors de son chargement, vous pouvez utiliser le paramètre taillemin de façon à garantir que le gestionnaire ne sera pas chargé dans un UMB trop petit pour lui. Si vous indiquez une valeur pour taillemin, MS-DOS ne charge le gestionnaire dans la région précisée que si elle contient un UMB d'une taille supérieure à la taille de chargement du gestionnaire et à la valeur taillemin.
  /S Réduit l'UMB à sa taille minimale lors du chargement du gestionnaire. Ce commutateur permet d'optimiser l'utilisation de la mémoire. Il n'est habituellement utilisé que par le programme MemMaker, capable d'analyser l'usage qu'un gestionnaire de périphérique fait de la mémoire en vue de déterminer s'il est possible de recourir au commutateur /S lors du chargement de ce gestionnaire. Ce commutateur ne peut être utilisé qu'en conjonction avec le commutateur /L, et affecte uniquement les UMB pour lesquels une taille minimale a été indiquée.
 
dir Affiche une liste de fichiers et de sous-répertoires dans un répertoire.
  dir [lecteur:][chemin][nom_de_fichier] [/A[[:]attributs]] [/C] [/D] [/O[[:]tri]] [/P] [/Q] [/S] [/W] [/X]
  [lecteur:][chemin][nom_de_fichier] Spécifie le lecteur, le répertoire et/ou fichiers à lister.
  /A Affiche les fichiers dotés des attributs spécifiés.
    attributs
 
D	Répertoire
H	Caché
R	Lecture seule
A	Archive
S	Système
-	Préfixe de négation
	
  /C Affiche le séparateur de milliers pour les tailles de fichiers. Ceci est la valeur par défaut. Utilisez /-C pour désactiver l'affichage du séparateur.
  /D Sur cinq colonnes avec fichiers triés par colonne.
  /O Affiche les fichiers selon un tri spécifié.
    tri
 
N  Nom (alphabétique)
S  Taille (ordre croissant)
Extension (alphabétique)
D  Date et heure (chronologique)
G  Répertoires en tête
-  Préfixe en ordre indirect
	
  /P Arrêt après l'affichage d'un écran d'informations.
  /Q Affiche le nom du propriétaire du fichier.
  /S Affiche les fichiers d'un répertoire et de ses sous-répertoires.
  /W Affichage sur cinq colonnes.
  /X Affiche les noms courts générés pour les noms de fichier non 8.3 car.
    Ce format est celui de /N avec le nom court inséré avant le nom long.
    S'il n'y a pas de nom court, des espaces seront affichés à la place.
Les commutateurs peuvent être préconfigurés dans la variable d'environnement DIRCMD. Pour les ignorer, les préfixer avec un trait d'union. Par exemple /-W.
 
diskcopy Copie le contenu d'une disquette vers une autre.
  diskcopy [lecteur1: [lecteur2:]] [/V]
  /V Vérifie que les informations sont copiées correctement.
Les deux disquettes doivent être du même type. Vous pouvez spécifier le même lecteur pour lecteur1 et lecteur2.
 
echo Affiche des messages ou active/désactive l'affichage des commandes.
  echo [ON | OFF]
  echo [message]
    echo sans paramètres affiche l'état en cours de la commande.
 
emm386 Active ou désactive la gestion de mémoire paginée EMM386 d'un ordinateur équipé d'un processeur 80386 ou plus puissant. La commande EMM386 active ou désactive également la gestion d'un coprocesseur Weitek. N'utilisez pas cette commande si vous exécutez Windows.
  emm386 [ON|OFF|AUTO] [W=ON|W=OFF]
  ON|OFF|AUTO Active le gestionnaire de périphérique EMM386.EXE (si vous spécifiez ON), le désactive (si vous spécifiez OFF) ou lui applique le mode Auto (si vous spécifiez AUTO). Ce mode n'active la gestion de mémoire paginée que lorsqu'un programme le demande. La valeur par défaut est ON.
  W=ON|W=OFF Active (W=ON) ou désactive (W=OFF) le coprocesseur Weitek. W=OFF est la valeur par défaut.
 
exit Quitte le programme CMD.EXE (interpréteur de commandes) ou les script batch en cours.
  exit [/B] [CodeSortie]
  /B Spécifie la sortie du fichier script en cours au lieu de CMD.EXE. Si exécutée à l'extérieur d'un fichier batch, cette option terminera CMD.EXE
  CodeSortie Spécifie un nombre. Si /B est utilisé, le paramètre ERRORLEVEL est fixé à ce nombre. Lors de la sortie de CMD.EXE, ce nombre correspond au code de sortie du processus.
 
expand Décompresse un fichier. Cette commande permet de récupérer un ou plusieurs fichiers des disquettes Install fournies avec MS-DOS 6.22. Vous ne pouvez utiliser ces fichiers qu'après décompression.
  expand [lecteur:][chemin]fichier [[lecteur:][chemin]fichier[...]] destination
  [lecteur:][chemin]fichier Spécifie l'emplacement et le nom d'un ou de plusieurs fichiers à décompresser. Vous ne pouvez pas utiliser de caractères génériques (* et ?).
  destination Spécifie l'emplacement et/ou le nom du ou des fichiers décompressés. La destination peut être une lettre de lecteur suivie de deux points, un nom de répertoire, un nom de fichier, ou une combinaison des trois. Sachez cependant que si vous spécifiez un nom de fichier, il doit correspondre à un seul fichier compressé.
 
fdisk Lance le programme Fdisk, qui configure un disque dur à utiliser avec MS-DOS.
  Fdisk affiche une série de menus vous permettant de partitionner le(s) disque(s) dur(s) à utiliser avec MS-DOS.
  fdisk /status Pour afficher le partitionnement du disque sans lancer le programme Fdisk.
 
files Indique le nombre de fichiers auxquels MS-DOS peut accéder simultanément. Vous ne pouvez utiliser cette commande que dans le fichier CONFIG.SYS.
  files=x
  x Spécifie le nombre de fichiers auxquels MS-DOS peut accéder simultanément. Les valeurs admises pour x vont de 8 à 255. La valeur par défaut est 8.
find Recherche une chaîne de texte dans un ou plusieurs fichiers.
  find [/V] [/C] [/N] [/I] "chaîne" [[lecteur:][chemin]nom_de_fichier[...]]
  /V Affiche toutes les lignes ne contenant pas la chaîne spécifiée.
  /C Affiche seulement le nombre de lignes contenant la chaîne.
  /N Affiche les numéros de ligne avec les lignes affichées.
  /I Ignore la casse lors de la recherche de la chaîne.
  "chaîne" Spécifie la chaîne de texte à trouver.
  [lecteur:][chemin]nom_de_fichier Spécifie un ou des fichiers pour la recherche.
Sans nom de chemin, FIND recherche le texte entré à l'invite ou redirigé depuis une autre commande.
 
findstr Recherche de chaînes de caractères dans les fichiers.
  findstr [/B] [/E] [/L] [/R] [/S] [/I] [/X] [/V] [/N] [/M] [/O] [/P][/C:chaîne] [/G:fichier] [/D:liste de répertoires][chaînes][[lecteur:][chemin]nom de fichier[ ...]]
  /B Recherche l'élément s'il est en début de ligne.
  /E Recherche l'élément s'il est en fin de ligne.
  /L Recherche les chaînes littéralement.
  /R Recherche les chaînes en tant qu'expressions.
  /S Recherche les fichiers correspondants dans le répertoire actif et dans tous ses sous-répertoires.
  /I Spécifie que la recherche ne doit pas tenir compte de la casse.
  /X Affiche les lignes correspondant parfaitement.
  /V N'affiche que les lignes non correspondantes.
  /N Affiche le numéro de ligne devant chaque ligne correspondante.
  /M Affiche uniquement le nom des fichiers contenant des chaînes correspondantes.
  /O Affiche le décalage des caractères pour chaque ligne correspondante.
  /P Ignore les fichiers ne contenant pas de caractères affichables.
  /C:chaîne Recherche la chaîne spécifiée littéralement.
  /G:fichier Obtient les chaînes à rechercher à partir du fichier spécifié (/ pour la console).
  /D:rép Recherche dans une liste de répertoires délimitée par des points-virgules.
  chaînes Chaînes à rechercher.
  [lecteur:][chemin]nom de fichier Spécifie les fichiers dans lesquels effectuer la recherche.
Utilisez des espaces pour séparer plusieurs chaînes à rechercher, sauf si l'argument est précédé de /C. Exemple : 'FINDSTR "bonne journée" x.y' recherche "bonne" ou "journée" dans le fichier x.y. 'FINDSTR /C:"bonne journée" x.y' recherche "bonne journée" dans le fichier x.y.
 
for Exécute la commande que vous spécifiez pour chaque fichier d'un groupe.Vous pouvez utiliser FOR dans un programme de commandes ou directement sur la ligne de commande.
  FOR %%variable IN (groupe) DO commande [param]
  %%variable ou %variable Représente une variable remplaçable. La commande FOR remplace %%variable (ou %variable) par chaque chaîne de texte figurant dans le groupe spécifié, jusqu'à ce que la commande donnée en paramètre ait traité tous les fichiers. Utilisez %%variable pour exécuter la commande FOR dans un programme de commandes. Utilisez %variable pour exécuter FOR sur la ligne de commande.
  (groupe) Sélectionne un ou plusieurs fichiers ou chaînes de texte à traiter à l'aide de la commande spécifiée. Les parenthèses sont obligatoires.
  commande Indique la commande à exécuter dans chaque fichier du groupe spécifié.
  param Indique les paramètres ou commutateurs à utiliser avec la commande spécifiée (si elle en accepte).
 
format Formate un disque utilisable avec Windows. La commande FORMAT crée un nouveau répertoire racine et une table d'allocation des fichiers. Elle peut également vérifier la présence d'éventuelles zones défectueuses sur le disque et supprimer toutes les données qu'il contient.
  format volume [/FS:sys_fich] [/V:nom_volume] [/Q] [/A:taille] [/C] [/X] [/T:pistes /N:secteurs] [/S] [/U]
  format volume [/V:nom_volume] [/Q] [/F:taille]
  format volume [/V:nom_volume][/Q][/T:pistes /N:secteurs]
  format volume [/V:nom_volume][/Q]
  format volume [/Q]
  volume Spécifie la lettre de lecteur (suivie de deux-points), le point de montage ou le nom de volume.
  /FS:sys_fich Spécifie le type de système de fichiers (FAT, FAT32 ou NTFS).
  /V:nom_de_volume Spécifie le nom de volume.
  /C NTFS uniquement : Les fichiers créés sur le nouveau volume seront compressés par défaut.
  /Q Effectue un formatage rapide.
  /U Spécifie le formatage inconditionnel d'un disque. Cette procédure supprime toutes les données du disque et empêche l'annulation ultérieure du formatage. Utilisez ce commutateur si des erreurs de lecture ou d'écriture se sont produites durant l'utilisation d'un disque.
  /S Copie les fichiers système IO.SYS, MSDOS.SYS et COMMAND.COM du lecteur de lancement vers un disque nouvellement formaté qui peut être utilisé comme disque système. Si FORMAT ne trouve pas les fichiers système, vous êtes invité à insérer une disquette système.
  /X Force le volume à être démonté d'abord si nécessaire. Tous les descripteurs ouverts sur le volume ne seront plus valides.
  /A:taille Remplace la taille d'unité d'allocation par défaut. Les paramètres par défaut sont très fortement recommandés dans le cas général.
    NTFS gère 512, 1024, 2048, 4096, 8192, 16 Ko, 32 Ko, 64 Ko, FAT gère 512, 1024, 2048, 4096, 8192, 16 Ko, 32 Ko, 64 Ko(128 Ko, 256 Ko pour taille de secteur > 512 octets), FAT32 gère 512, 1024, 2048, 4096, 8192, 16 Ko, 32 Ko, 64 Ko (128 Ko, 256 Ko pour taille de secteur > 512 octets).
    Notez que les systèmes de fichiers FAT et FAT32 imposent les restrictions suivantes sur le nombre de clusters par volume :
    FAT : nombre de clusters <= 65526
    FAT32 : 65526 < nombre de clusters < 4177918
    Le formatage cessera immédiatement s'il est jugé que les conditions ci-dessus ne peuvent pas être remplies en utilisant la taille de clusters spécifiée.
    La compression NTFS n'est pas prise en charge pour les tailles d'unités d'allocation supérieures à 4096.
  /F:taille Spécifie la taille de la disquette à formater (1.44)
  /T:pistes Spécifie le nombre de pistes par face de disque.
  /N:secteurs Spécifie le nombre de secteurs par piste.
 
goto Dirige cmd.exe sur une ligne étiquetée dans le programme de commandes.
  goto nom
  nom Chaîne utilisée en tant que nom dans le programme de commandes. Les noms sont seuls sur une ligne et commencent par le signe ':'
Si les extensions de commandes sont activées, GOTO est modifié comme suit : La commande GOTO accepte maintenant l'étiquette cible :EOF, qui transfère le contrôle à la fin du fichier de commande en cours. C'est un moyen pratique de sortir d'un fichier de commande sans y définir de nom de sortie. Entrer CALL /? pour avoir une description des extensions de la commande CALL qui rendent cette fonctionnalité utile.
 
graphics Charge en mémoire un programme permettant à MS-DOS d'imprimer l'écran affiché, uniquement si vous utilisez un adaptateur couleur ou une carte graphique. La commande GRAPHICS est compatible avec les modes d'affichage graphique CGA, EGA et VGA.
  GRAPHICS [type] [[lecteur:][chemin]fichier] [/R] [/B] [/LCD] [/PRINTBOX:STD|/PRINTBOX:LCD]
  type Spécifie le type d'imprimante. La liste ci-dessous présente les valeurs admises pour ce paramètre:
    COLOR1 Imprimante IBM Personal Computer Color Printer avec ruban monochrome
    COLOR4 Imprimante IBM Personal Computer Color Printer avec ruban couleur RGB (rouge, vert, bleu, noir)
    COLOR8 Imprimante IBM Personal Computer Color Printer avec ruban couleur CMY (cyan, magenta, jaune, noir)
    HPDEFAULT Imprimante Hewlett-Packard PCL
    DESKJET Imprimante Hewlett-Packard DeskJet
    GRAPHICS Imprimante IBM Personal Graphics Printer, IBM Proprinter ou IBM Quietwriter
    GRAPHICSWIDE Imprimante IBM Personal Graphics Printer avec chariot de 279 mm (11 pouces)
    LASERJET Imprimante Hewlett-Packard LaserJet
    LASERJETII Imprimante Hewlett-Packard LaserJet II
    PAINTJET Imprimante Hewlett-Packard PaintJet
    QUIETJET Imprimante Hewlett-Packard QuietJet
    QUIETJETPLUS Imprimante Hewlett-Packard QuietJet Plus
    RUGGEDWRITER Imprimante Hewlett-Packard RuggedWriter
    RUGGEDWRITERWIDE Imprimante Hewlett-Packard RuggedWriterwide
    THERMAL Imprimante thermique IBM PC-convertible
    THINKJET Imprimante Hewlett-Packard ThinkJet
  [lecteur:][chemin]fichier Spécifie l'emplacement et le nom du profil d'imprimante qui contient les informations relatives à toutes les imprimantes prises en charge. Si vous ne précisez pas ce paramètre, MS-DOS recherche le fichier GRAPHICS.PRO dans le répertoire en cours et dans celui qui contient le fichier GRAPHICS.COM.
  /R Imprime l'image telle qu'elle apparaît à l'écran (caractères blancs sur fond noir) et non l'inverse (caractères noirs sur fond blanc). Il s'agit du paramètre par défaut.
  /B Imprime le fond en couleurs. Ce commutateur est accepté par les imprimantes COLOR4 et COLOR8.
  /LCD Imprime l'image en utilisant le rapport hauteur/largeur d'un écran à cristaux liquides (LCD) au lieu du rapport hauteur/largeur CGA. Ce commutateur a le même effet que /PRINTBOX:LCD.
  /PRINTBOX:STD ou /PRINTBOX:LCD Définit la taille de la printbox. Vous devez vérifier le premier opérande de l'instruction PRINTBOX dans le fichier GRAPHICS.PRO. S'il s'agit de STD, spécifiez /PRINTBOX:STD, et /PRINTBOX:LCD si l'opérande est LCD. L'abréviation PB est autorisée.
 
himem.sys HIMEM est un gestionnaire de mémoire étendue. Il s'agit d'un programme qui gère la mémoire étendue du système et notamment sa zone de mémoire supérieure (HMA), pour empêcher que deux applications ou gestionnaires de périphérique utilisent la même partie de la mémoire simultanément.
  DEVICE=[lecteur:][chemin]HIMEM.SYS [/A20CONTROL:ON|OFF] [/CPUCLOCK:ON|OFF] [/EISA] [/HMAMIN=m] [/INT15=xxxx] [/NUMHANDLES=n] [/MACHINE:xxxx] [/SHADOWRAM:ON|OFF] [/TESTMEM:ON|OFF] [/VERBOSE]
Le plus souvent, il est inutile de spécifier des commutateurs, car les valeurs par défaut s'appliquent à la plupart des configurations matérielles.
  [lecteur:][chemin] Spécifie l'emplacement du fichier HIMEM.SYS. Ce fichier doit toujours se trouver sur le même lecteur que vos fichiers MS-DOS. S'il se trouve dans le répertoire racine du lecteur de lancement, il est inutile de préciser son chemin, mais vous devez toujours indiquer le nom du fichier (HIMEM.SYS).
  /A20CONTROL:ON|OFF Spécifie si HIMEM doit prendre le contrôle de la ligne A20, même si celle-ci était activée lors du chargement de HIMEM. Le programme de traitement A20 permet à votre ordinateur d'accéder à la zone de mémoire supérieure. Si vous spécifiez /A20CONTROL:OFF, HIMEM prend le contrôle de la ligne A20 uniquement si cette dernière était désactivée lors du chargement de HIMEM. Le paramètre par défaut est /A20CONTROL:ON
  /CPUCLOCK:ON|OFF Spécifie si HIMEM doit avoir une incidence sur la vitesse d'horloge de votre ordinateur. Si cette dernière est modifiée lorsque vous installez HIMEM, vous pouvez résoudre le problème en spécifiant /CPUCLOCK:ON. Toutefois, l'activation de ce commutateur ralentit HIMEM. Le paramètre par défaut est /CPUCLOCK:OFF.
  /EISA Indique à HIMEM.SYS d'allouer toute la mémoire étendue disponible. Ce commutateur ne concerne que les systèmes EISA (Extended Industry Standard Architecture) ayant plus de 16 Mo de mémoire. Sur les autres systèmes, HIMEM alloue automatiquement toute la mémoire étendue disponible.
  /HMAMIN=m Spécifie la capacité mémoire (en kilo-octets) qu'une application doit utiliser pour que HIMEM lui donne accès à la zone de mémoire supérieure. Etant donné que cette zone ne peut être utilisée que par une application à la fois, HIMEM l'alloue à la première qui satisfait au critère défini pour ce commutateur. Les valeurs admises s'échelonnent entre 0 et 63. Pour le paramètre m, indiquez une valeur correspondant à la capacité mémoire nécessaire à l'application qui utilise le plus de mémoire supérieure. Ce commutateur est facultatif. La valeur par défaut est zéro. Si vous n'indiquez aucune valeur ou que vous conservez la valeur par défaut, HIMEM alloue la mémoire HMA à la première application qui tente d'y accéder, quel que soit le nombre de kilo-octets qu'elle utilise. Le commutateur /HMAMIN n'a aucun effet lorsque vous exécutez Windows en mode 386 étendu.
  /INT15=xxxx Indique le nombre de kilo-octets de mémoire étendue à allouer à l'interruption 15h. Certaines anciennes applications utilisent cette interface plutôt que la méthode XMS fournie par HIMEM pour allouer la mémoire étendue. Si vous utilisez de telles applications, vous devez leur garantir une quantité suffisante de mémoire: calculez la valeur de xxxx en ajoutant 64 kilo-octets à la capacité mémoire nécessaire à l'application.
  /NUMHANDLES=n Spécifie le nombre maximum de descripteurs de bloc de mémoire étendue (EMB) pouvant être utilisés simultanément. Les valeurs admises s'échelonnent entre 1 et 128, la valeur par défaut étant 32. Chaque descripteur requiert 6 octets de mémoire. Le commutateur /NUMHANDLES n'a aucun effet lorsque vous exécutez Windows en mode 386 étendu.
  /MACHINE:xxxx Spécifie le type d'ordinateur utilisé. HIMEM parvient à déterminer le type de la plupart des systèmes, à quelques exceptions près. Dans ce cas, c'est le type de système par défaut qui est utilisé (IBM AT ou compatible). Cependant, vous devrez peut-être spécifier le commutateur /MACHINE si HIMEM ne reconnaît pas le type de votre ordinateur et ne fonctionne pas correctement avec la valeur par défaut. Ce commutateur est actuellement nécessaire pour les systèmes de type Acer 1100, Wyse et IBM 7552. La valeur de xxxx peut être l'un des codes ci-dessous ou le numéro équivalent.
Code	  Numéro   Type d'ordinateur
at	    1	IBM AT ou compatible
ps2	    2	IBM PS/2
ptlcascade  3	Phoenix Cascade BIOS
hpvectra    4	HP Vectra (A & A+)
att6300plus 5	AT&T 6300 Plus
acer1100    6	Acer 1100
toshiba	    7	Toshiba 1600 et 1200XE
wyse	    8	Wyse 286 12,5 Mhz
tulip	    9	Tulip SX
zenith	    10	Zénith ZBIOS
at1	    11	IBM PC/AT (autre délai)
at2	    12	IBM PC/AT (autre délai)
css	    12	CSS Labs
at3	    13	IBM PC/AT (autre délai)
philips	    13	Philips
fasthp	    14	HP Vectra
ibm7552	    15	IBM 7552 Industrial Computer
bullmicral  16	BM 60
dell	    17	Dell XBIOS
	
  /SHADOWRAM:ON|OFF Indique s'il faut désactiver la mémoire de copie RAM (SHADOWRAM:OFF) ou s'il faut laisser le code ROM s'exécuter à partir de la RAM (SHADOWRAM:ON). Certains ordinateurs exécutent le code ROM plus rapidement lorsqu'il est copié au démarrage dans la mémoire vive, au temps d'accès plus court. Toutefois, cette fonction utilise de la mémoire étendue. Sur les ordinateurs dotés de moins de 2 Mo de mémoire vive et utilisant la mémoire de copie, HIMEM essaie généralement de désactiver la mémoire de copie afin de récupérer de la mémoire étendue pour Windows. Cette désactivation n'est possible que sur certains types de systèmes. Lorsque HIMEM désactive la mémoire de copie, le code ROM s'exécute en mémoire morte (ROM), qui est plus lente que la mémoire vive, et l'ordinateur risque de fonctionner moins rapidement.
  /TESTMEM:ON|OFF Détermine si HIMEM a réalisé un test de la mémoire lors du démarrage de votre ordinateur. Par défaut, HIMEM test la fiabilité de la mémoire étendue de votre ordinateur à chaque démarrage. Ce test peut détecter la mémoire n'étant plus fiable. De la mémoire non fiable peut causer une instabilité de votre système ou une perte de données. Le test mémoire de HIMEM est plus complet que le test réalisé lors du démarrage de la plupart des ordinateurs. Pour empêcher HIMEM de réaliser le test mémoire, précisez /TESTMEM:OFF. La désactivation du test mémoire réduira Le temps du processus de démarrage. (Le paramètre par défaut est /TESTMEM:ON.)
  /VERBOSE Indique à HIMEM.SYS d'afficher les messages d'état et d'erreur lors du chargement. Par défaut, HIMEM.SYS n'affiche pas ces messages. L'abréviation /V est autorisée. (Pour afficher l'état des messages sans ajouter le commutateur /VERBOSE, appuyez et maintenez enfoncée la touche ALT pendant le démarrage et le chargement de HIMEM.)
Pour installer HIMEM.SYS, ajoutez une commande le concernant au fichier CONFIG.SYS. Cette ligne de commande doit précéder toutes celles qui lancent des applications ou des gestionnaires de périphérique utilisant la mémoire étendue, tels que EMM386.EXE par exemple.
 
if Lance l'exécution conditionnelle dans un programme de commandes.
  IF [NOT] ERRORLEVEL nombre commande
  IF [NOT] chaîne1==chaîne2 commande
  IF [NOT] EXIST nom_de_fichier commande
  NOT n'effectue la commande que si la condition est fausse.
  ERRORLEVEL nombre Condition vraie si le dernier programme exécuté a retourné un code sortie supérieur/égal au nombre donné pa la commande. Spécifie la commande à exécuter si la condition est satisfaite.
  chaîne1==chaîne2 Condition vraie si les chaînes spécifiées sont identiques.
  EXIST nom_de_fichier Condition vraie si le nom de fichier donné existe.
  commande Spécifie la commande à exécuter si la condition est vérifiée. Commande peut être suivi de la commande ELSE qui exécutera la commande située après le mot-clé ELSE si la condition est fausse (FALSE)
     
    La clause ELSE doit être sur la même ligne que la commande suivant IF. Par exemple:
     
    IF EXIST nomfichier. (
    del nomfichier.
    ) ELSE (
    echo nomfichier. introuvable.
    )
     
    L'exemple suivant NE marche PAS car la commande del doit être terminée par une nouvelle ligne :
     
    IF EXIST nomfichier. del nomfichier. ELSE echo nomfichier. introuvable
     
    L'exemple suivant NE marche PAS non plus, car la commande ELSE doit être sur la même ligne que la fin de la commande IF :
     
    IF EXIST nomfichier. del nomfichier.
    ELSE echo nomfichier. introuvable
     
    Enfin, l'exemple suivant marche si vous l'écrivez sur une seule ligne :
    IF EXIST nomfichier. (del nomfichier.) ELSE echo nomfichier. introuvable
keyb Lance le programme Keyb, qui configure le clavier pour une langue donnée. Utilisez la commande Keyb pour configurer votre clavier dans une langue autre que l'américain.
  keyb [xx[,[yyy][,[lecteur:][chemin]fichier]]] [/E] [/ID:nnn]
La ligne de commande tapée dans le fichier CONFIG.SYS doit respecter la syntaxe suivante:
  INSTALL=[[lecteur-dos:]chemin-dos]KEYB.COM [xx[,[yyy][,[lecteur:][chemin]fichier]]] [/E] [/ID:nnn]
  xx Spécifie le code de clavier. Vous trouverez la liste des valeurs admises pour ce paramètre à la fin de cette rubrique.
  yyy Spécifie la page de codes (jeu de caractères). Vous trouverez la liste des valeurs admises pour ce paramètre à la fin de cette rubrique. Si vous n'indiquez aucune valeur, KEYB utilise la page de codes en cours.
  [lecteur:][chemin]fichier Spécifie l'emplacement et le nom du fichier de définition de clavier. Le nom par défaut est KEYBOARD.SYS. Si ce fichier se trouve dans le même répertoire que le fichier CONFIG.SYS, il n'est pas nécessaire de spécifier ces paramètres. (MS-DOS 6.22 inclut deux fichiers de définition de claviers : KEYBOARD.SYS, le fichier par défaut et KEYBRD2.SYS, lequel permet de supporter des claviers non inclus dans KEYBOARD.SYS.
  [lecteur-dos:]chemin-dos Spécifie l'emplacement du fichier KEYB.COM.
  /E Indique qu'un clavier étendu est installé. Utilisez ce commutateur si vous utilisez un clavier étendu sur un ordinateur de type 8086.
  /ID:nnn Spécifie le clavier utilisé. Ce commutateur est valide uniquement pour les pays dont la langue permet d'utiliser plusieurs dispositions de clavier (France, Italie et Royaume-Uni). Le tableau ci-dessous présente les valeurs admises pour nnn.
Pays ou langue		Code de clavier (xx)	Jeu de car. par defaut (yyy)
Belgique			be			850, 437
Brésil				br			850, 437
Canada francophone		cf			850, 863
Tchécoslovaquie (tchèque)	cz			852, 850
Tchécoslovaquie (slovaque)	sl			852, 850
Danemark			dk			850, 865
Finlande			su			850, 437
France				fr			850, 437
Grece				gr			850, 437
Hongrie				hu			852, 850
Italie				it			850, 437
Amérique latine			la			850, 437
Pays-Bas			nl			850, 437
Norvège				no			850, 865
Pologne				pl			852, 850
Portugal			po			850, 860
Espagne				sp			850, 437
Suède				sv			850, 437
Suisse (romande)		sf			850, 437
Suisse (alémanique)		sg			850, 437
Royaume-Uni			uk			850, 437
Etats-Unis			us			850, 437
Croatie/Serbie/Slovénie		yu			852, 850
 
label Crée, modifie ou supprime le nom de volume d'un disque.
  label [lecteur:][nom_volume]
  label [/MP] [volume] [nom_volume]
  lecteur: Spécifie la lettre d'un lecteur.
  nom_volume Spécifie le nom du volume.
  /MP Spécifie si 'volume' doit être traité comme un point de montage (MP) ou comme un nom de volume.
  volume Spécifie la lettre de lecteur (suivie de deux-points), le point de montage ou le nom de volume. Si un nom de volume est spécifié, le commutateur /MP n'est pas nécessaire.
 
loadfix Charge un programme au-delà des 64 premiers kilo-octets de mémoire conventionnelle et le lance.
  loadfix [lecteur:][chemin]fichier [paramètres]
  [lecteur:][chemin] Spécifie le lecteur et le répertoire contenant le programme.
  fichier Spécifie le nom du programme.
 
loadhigh Charge un programme en zone de mémoire supérieure, ce qui libère de la mémoire conventionnelle pour d'autres programmes.
  loadhigh [/L:région1[,taillemin1][;région2[,taillemin2]...] [/S]][lecteur:][chemin]fichier [paramètres]
  lh [/L:région1[,taillemin1][;région2[,taillemin2]...] [/S]][lecteur:][chemin]fichier [paramètres]
  /L:région1[,taillemin1][;région2[,taillemin2]...] Spécifie la ou les régions de la mémoire dans lesquelles vous souhaitez charger le programme. Si vous n'indiquez pas le commutateur /L, MS-DOS effectue le chargement dans le plus vaste bloc de mémoire supérieure disponible (UMB) et met tous les autres UMB à sa disposition. Utilisez le commutateur /L si vous souhaitez charger le programme dans une région donnée ou spécifier les régions qu'il peut utiliser. Pour charger le programme dans le plus vaste bloc d'une région donnée de la mémoire supérieure, indiquez le numéro de cette région après le commutateur /L. Par exemple, entrez /L:4 pour le charger dans le plus vaste bloc disponible de la région 4. Pour afficher les zones de mémoire disponibles, tapez la commande MEM /F à l'invite MS-DOS. Lorsque vous chargez un programme en spécifiant le commutateur /L, il dispose uniquement de la région de mémoire indiquée. Or, certains programmes nécessitent plus d'une zone de mémoire. Dans ce cas, vous devez spécifier plusieurs régions. Pour savoir comment un programme donné utilise la mémoire, utilisez la commande MEM /M en spécifiant le nom du programme comme argument. Lorsque vous spécifiez plusieurs régions de mémoire, vous devez séparer les numéros des blocs correspondants par un point-virgule (;). Par exemple, tapez /L:2;3 pour utiliser les blocs 2 et 3. En règle générale, MS-DOS charge le programme dans un bloc de mémoire supérieure de la région spécifiée uniquement si cette dernière contient un bloc plus vaste que la taille de chargement du programme (il s'agit généralement de la taille du fichier exécutable). Si l'exécution du programme requiert plus de mémoire que lors de son chargement, utilisez le paramètre taillemin pour être sûr que le programme ne sera pas chargé dans un bloc de mémoire supérieure de taille insuffisante. Dans ce cas, MS-DOS charge le programme dans la région indiquée uniquement si elle contient un bloc plus vaste que la taille de chargement du programme et que la valeur de taillemin.
  /S Réduit le bloc de mémoire supérieure à sa taille minimale pendant le chargement du programme. Ce commutateur permet d'utiliser la mémoire de façon plus efficace. Généralement, seul le programme MemMaker l'utilise. MemMaker analyse les besoins en mémoire d'un programme, pour déterminer si le commutateur /S peut être utilisé sans risques lors de son chargement. /S s'utilise uniquement associé au commutateur /L et n'affecte que les blocs de mémoire supérieure pour lesquels une taille minimale a été spécifiée.
 
md Crée un répertoire.
  mkdir [lecteur:]chemin
  md [lecteur:]chemin
 
mem Affiche la capacité mémoire utilisée et disponible sur votre système. Vous pouvez utiliser la commande MEM pour afficher des informations sur les zones de mémoire allouées et disponibles, et sur les programmes chargés en mémoire.
  MEM [/CLASSIFY|/DEBUG|/FREE|/MODULE programme] [/PAGE]
  MEM Affiche l'état de la mémoire utilisée et disponible.
  /CLASSIFY Affiche la liste des programmes actuellement chargés en mémoire conventionnelle et en mémoire supérieure, en indiquant pour chacun d'entre eux l'espace qu'ils y occupent. MEM /CLASSIFY fournit également un récapitulatif de l'utilisation de la mémoire, ainsi que la liste des plus vastes blocs de mémoire supérieure disponibles. Le seul commutateur utilisable avec /CLASSIFY est /PAGE, tous les autres étant exclus.L'abréviation /C est autorisée.
  /DEBUG Affiche la liste des programmes et des gestionnaires internes actuellement chargés en mémoire. MEM /DEBUG indique la taille de chaque module, l'adresse du segment correspondant et le type de module, fournit un récapitulatif de l'utilisation de la mémoire et affiche d'autres informations utiles aux programmeurs. Le seul commutateur utilisable avec /DEBUG est /PAGE, tous les autres étant exclus. L'abréviation /D est autorisée.
  /FREE Affiche la liste des zones disponibles en mémoire conventionnelle et en mémoire supérieure. MEM /FREE indique l'adresse de segment et la taille de chacune des zones de mémoire conventionnelle disponibles, ainsi que le plus vaste bloc disponible dans chaque région de la mémoire supérieure. Cette commande fournit également un récapitulatif de l'utilisation de la mémoire. Le seul commutateur utilisable avec /FREE est /PAGE, tous les autres étant exclus. L'abréviation /F est autorisée.
  /MODULE programme Indique comment un module de programme utilise la mémoire. Vous devez faire suivre le commutateur /MODULE du nom du programme concerné. MEM /MODULE affiche la liste des zones de mémoire allouées par le module spécifié, en indiquant leur adresse et leur taille. Le seul commutateur utilisable avec /MODULE est /PAGE, tous les autres étant exclus. L'abréviation /M est autorisée.
  /PAGE Marque une pause avant d'afficher l'écran de données suivant. Vous pouvez associer /PAGE à tous les autres commutateurs de la commande MEM.
 
menucolor Définit les couleurs du texte et du fond pour le menu de démarrage. S'utilise uniquement dans un bloc de menu du fichier CONFIG.SYS. Le menu de démarrage affiche une liste de choix lorsque vous allumez l'ordinateur. Pour le constituer, vous devez utiliser des commandes particulières dans le fichier CONFIG.SYS. Chaque élément de menu correspond en fait à un groupe de commandes de ce fichier, ou "bloc de configuration". A chaque fois que vous démarrez votre ordinateur, ce menu vous permet de choisir une configuration parmi celles que vous avez définies. Pour plus d'informations sur la définition de plusieurs configurations, consultez le chapitre "Configuration de votre système" du Guide de l'utilisateur de MS-DOS.
  menucolor=x[,y]
  x Spécifie la couleur du texte du menu. Les valeurs admises vont de 0 à 15.
  y Spécifie la couleur du fond de l'écran. Les valeurs admises vont de 0 à 15.
  0 Noir
  1 Bleu
  2 Vert
  3 Cyan
  4 Rouge
  5 Magenta
  6 Marron
  7 Blanc
  8 Gris
  9 Bleu vif
  10 Vert vif
  11 Cyan vif
  12 Rouge vif
  13 Magenta vif
  14 Jaune
  15 Blanc vif
 
menudefault Spécifie l'élément par défaut du menu de démarrage et, si vous le souhaitez, le délai après lequel le système choisit cet élément. Cette commande s'utilise uniquement dans les blocs de menu du fichier CONFIG.SYS. Si vous ne la spécifiez pas, l'élément par défaut est le premier du menu. Le menu de démarrage affiche une liste de choix lorsque vous allumez l'ordinateur. Pour le constituer, vous devez utiliser des commandes particulières dans le fichier CONFIG.SYS. Chaque élément de menu correspond en fait à un groupe de commandes de ce fichier, ou "bloc de configuration". A chaque fois que vous démarrez votre ordinateur, ce menu vous permet de choisir une configuration parmi celles que vous avez définies.
  menudefault=bloc[,délai]
  bloc Spécifie le bloc de configuration associé à l'élément de menu par défaut. Ce bloc doit être défini sur une autre ligne du fichier CONFIG.SYS. Lorsque le menu de démarrage apparaît, l'élément par défaut est mis en surbrillance et son numéro est affiché en regard de l'invite "Entrez votre choix".
  délai Détermine la durée (en secondes) après laquelle MS-DOS applique la configuration par défaut. Si vous n'indiquez pas ce paramètre, MS-DOS ne réagit pas tant que vous n'appuyez pas sur ENTREE. La durée admise est comprise entre 0 et 90 secondes. Si vous choisissez 0, la configuration par défaut sera systématiquement sélectionnée, sans que le menu ait le temps de s'afficher.
 
menuitem Définit un élément du menu de démarrage. Cette commande s'utilise uniquement dans les blocs de menu du fichier CONFIG.SYS. Vous pouvez définir jusqu'à 9 éléments par menu. Le menu de démarrage affiche une liste de choix lorsque vous allumez l'ordinateur. Pour le constituer, vous devez utiliser des commandes particulières dans le fichier CONFIG.SYS. Chaque élément de menu correspond en fait à un groupe de commandes de ce fichier, ou "bloc de configuration". A chaque fois que vous démarrez votre ordinateur, ce menu vous permet de choisir une configuration parmi celles que vous avez définies.
  menuitem=bloc[,texte_menu]
  bloc Spécifie le nom du bloc de configuration associé à l'élément. Ce bloc doit être défini sur une autre ligne du fichier CONFIG.SYS. Lorsque vous sélectionnez un élément dans le menu de démarrage, MS-DOS exécute les commandes figurant dans le bloc de configuration qui lui est associé, celles qui se trouvent au début du fichier CONFIG.SYS et toutes celles situées dans des blocs de configuration portant l'en-tête [common]. Si MS-DOS ne trouve pas de bloc du nom spécifié, l'élément n'apparaît pas dans le menu de démarrage. Les noms de bloc ne doivent pas dépasser 70 caractères. La plupart des caractères imprimables sont autorisés, à l'exception des barres obliques inverses (\), barres obliques (/), virgules, points-virgules (;), signes égal (=) et crochets ([ et ]). Les espaces ne sont pas admis.
  texte_menu Spécifie le texte à afficher correspondant à l'élément de menu. Si vous n'indiquez rien, MS-DOS affiche le nom du bloc associé. Tous les caractères sont acceptés, dans la limite de 70.
mode Configure les périphériques système.
  Port série : MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s][to=on|off] [xon=on|off] [odsr=on|off] [octs=on|off] [dtr=on|off|hs] [rts=on|off|hs|tg] [idsr=on|off]
  mode [périphérique] [/STATUS] État d'un périphériqe
  MODE LPTn[:]=COMm[:] Rediriger l'impression
  MODE CON[:] CP SELECT=yyy Choisir une page de codes
  MODE CON[:] CP [/STATUS] État de page de codes
  MODE CON[:] [COLS=c] [LINES=n] Mode d'affichage
  MODE CON[:] [RATE=r DELAY=d] Vitesse de répétition
 
more Affiche un écran de données à la fois. La commande MORE lit les données d'entrée standard provenant d'un canal de communication ou d'un fichier redirigé et affiche un écran de données à la fois. Elle s'utilise pour visualiser le contenu de longs fichiers.
  commande | MORE
 
move Transfère un ou plusieurs fichiers à l'endroit spécifié. La commande MOVE permet également de renommer les répertoires.
  move [/Y|/-Y] [lecteur:][chemin]nom de fichier[,[lecteur:][chemin]nom de fichier[...]] destination
  [lecteur:][chemin]fichier Spécifie l'emplacement et le nom du ou des fichiers à transférer ou le nom d'un répertoire à renommer.
  destination Spécifie le nouvel emplacement du fichier ou le nouveau nom du répertoire. La destination peut être indiquée par une lettre de lecteur suivie de deux points, un nom de répertoire ou les deux à la fois. Si vous ne transférez qu'un seul fichier, vous pouvez également le renommer en spécifiant un nom. Si vous lui donnez le nom et l'emplacement d'un fichier existant, ce dernier est écrasé.
  /Y Indique que la commande MOVE doit remplacer le(s) fichier(s) existant(s) sans vous demander confirmation. Par défaut, si vous spécifiez un fichier existant comme fichier de destination, la commande MOVE vous demande si vous souhaitez remplacer le fichier existant. (Les versions précédentes de MS-DOS remplacent purement et simplement le fichier existant.) Si la commande MOVE fait partie d'un fichier de commandes par lot, MOVE remplace le fichier sans vous demander confirmation. Si ce commutateur est spécifié, il prévaut sur tous les paramètres par défaut, ainsi que sur le paramètre courant de la variable d'environnement COPYCMD.
  /-Y Indique que la commande MOVE doit vous demander confirmation avant de remplacer un fichier existant. Si vous spécifiez ce commutateur, il prévaut sur tous les paramètres par défaut, ainsi que sur le paramètre courant de la variable d'environnement COPYCMD.
 
mscdex Permet d'accéder à un lecteur CD-ROM. MSCDEX peut être chargé depuis votre fichier AUTOEXEC.BAT ou à l'invite MS-DOS. Le gestionnaire de périphérique qui est fourni avec votre lecteur CD-ROM doit être chargé dans votre fichier CONFIG.SYS en utilisant la commande DEVICE ou DEVICEHIGH. La ligne de commande de votre lecteur CD-ROM doit inclure le paramètre /D:lecteur. Ce paramètre attribue un nom de gestionnaire (également appelé signature du lecteur) au gestionnaire de périphérique de votre lecteur CD-ROM. La commande MSCDEX ne doit pas être utilisé une fois que Windows est lancé.
  MSCDEX /D:lecteur [/D:gestionnaire2... ] [/E] [/K] [/S] [/V] [/L:lettre] [/M:nombre]
  /D:lecteur1 [/D:lecteur2... ] Spécifie la signature du premier gestionnaire de périphérique du CD-ROM. Le paramètre gestionnaire1 doit correspondre au paramètre spécifié par le commutateur /D de la commande du fichier CONFIG.SYS qui démarre le gestionnaire de périphérique correspondant au CD-ROM La commande MSCDEX doit inclure au moins un commutateur /D. Pour installer des gestionnaires de périphérique additionnels CD-ROM, spécifiez un commutateur /D supplémentaire pour chacun des gestionnaires de périphérique.
  /E Spécifie que le gestionnaire du CD-ROM est autorisé à utiliser la mémoire paginée, si disponible, pour y mettre les tampons de secteur.
  /K Indique à MS-DOS de reconnaître les volumes CD-ROM encodés en Kanji. Par défaut, MS-DOS ne reconnaît pas les volume CD-ROM Kanji.
  /S Active le partage des lecteurs CD-ROM sur les serveurs MS-NET ou Windows pour Workgroups.
  /V Indique à MSCDEX d'afficher les statistiques mémoire quand il démarre.
  /L:lettre Spécifie la lettre de lecteur à attribuer au premier lecteur CD-ROM. Si vous avez plus d'un lecteur CD-ROM, MS-DOS assigne les lecteurs CD-ROM additionnels à la prochaine lettre de lecteur disponible.
  /M:nombre Spécifie le nombre de tampons de secteur.
 
msd Affiche des données techniques détaillées sur votre ordinateur.
  msd [/I][/F[lecteur:][chemin]fichier] [/P[lecteur:][chemin]fichier] [/S[lecteur:][chemin][fichier]]
  msd [/B][/I]
    [lecteur:][chemin]fichier Spécifient le lecteur, le répertoire et le fichier où vous souhaitez décrire l'état en cours.
  /B Lance MSD en noir et blanc et non en couleurs. Utilisez ce commutateur si votre moniteur ne permet pas un bon affichage couleurs de ce programme.
  /I Indique à MSD de ne pas détecter le matériel installé. Utilisez ce commutateur si vous ne pouvez pas lancer ou faire fonctionner MSD correctement.
  /F[lecteur:][chemin]fichier Vous invite à entrer vos coordonnées (nom, société, adresse, pays, numéro de téléphone) et des commentaires, puis décrit l'état dans le fichier spécifié.
  /P[lecteur:][chemin]fichier Décrit un état MSD complet dans le fichier spécifié, sans vous demander aucune information.
  /S[lecteur:][chemin][fichier] Décrit un état récapitulatif MSD dans le fichier spécifié, sans vous demander aucune information. Si vous ne spécifiez pas de paramètre, MSD affiche l'état à l'écran.
 
numlock Spécifie si la fonction VERR.NUM du pavé numérique est initialement activée (ON) ou non (OFF). Cette commande s'utilise uniquement dans un bloc de menu du fichier CONFIG.SYS.
  numlock=[on:off]
 
path Affiche ou définit un chemin de recherche des fichiers exécutables.
  PATH [[lecteur:]chemin[;...][;%PATH%]
  PATH ;
    Entrez PATH ; pour effacer les chemins de recherche et indiquer à cmd.exe de ne chercher que dans le répertoire en cours.
    Entrez PATH sans paramètres pour afficher le chemin de recherche en cours.
    L'ajout de %PATH% dans le paramètre du nouveau chemin permet d'ajouter celui-ci à l'ancien chemin de recherche.
 
Appuyez sur une touche pour continuer...
 
print Imprime un fichier texte pendant que vous utilisez d'autres commandes MS-DOS. Cette commande permet l'impression en arrière-plan si vous avez connecté un périphérique de sortie à un port série ou parallèle.
  print [D:périph] [/B:taille] [/U:impuls1] [/M:impuls2] [/S:impuls3] [/Q:taille-file] [/T] [[lecteur:][chemin]fichier[ ...]] [/C] [/P]
  [lecteur:][chemin]fichier Spécifie l'emplacement et le nom du ou des fichiers à imprimer. Vous pouvez indiquer plusieurs fichiers (10, maximum en général) dans la même ligne de commande.
  /D:périph Spécifie le nom du périphérique d'impression. Les valeurs LPT1, LPT2 et LPT3 sont admises pour les périphériques connectés aux ports parallèles, et les valeurs COM1, COM2, COM3 et COM4 pour les périphériques connectés aux ports série. La valeur par défaut est LPT1, également appelé PRN. Le commutateur /D doit précéder tout nom de fichier figurant dans la ligne de commande.
  /B:taille Définit la taille (en octets) de la mémoire tampon interne, dans laquelle les données sont stockées avant d'être envoyées à l'imprimante. Le minimum, qui constitue la valeur par défaut, est de 512 octets, et le maximum de 16 384 octets. Si vous augmentez cette valeur, l'impression sera peut-être plus rapide mais la mémoire disponible pour d'autres opérations sera moins importante.
  /U:impuls1 Spécifie le nombre maximal d'impulsions d'horloge pendant lesquels PRINT attend qu'une imprimante se libère (il y a 18 impulsions par seconde). Si au bout de la durée spécifiée l'imprimante n'est toujours pas disponible, l'impression est annulée. Les valeurs admises pour le paramètre impuls1 vont de 1 à 255. La valeur par défaut est 1.
  /M:impuls2 Spécifie le nombre maximal d'impulsions d'horloge accordées à PRINT pour imprimer un caractère. Les valeurs admises vont de 1 à 255. La valeur par défaut est 2. Si l'impression du caractère est plus longue, MS-DOS affiche un message d'erreur.
  /S:impuls3 Spécifie le nombre d'impulsions d'horloge accordées par le répartiteur MS-DOS à l'impression en arrière-plan. Les valeurs admises vont de 1 à 255. La valeur par défaut est 8. Si vous augmentez cette valeur, l'impression sera peut-être plus rapide, mais les autres programmes s'exécuteront plus lentement.
  /Q:taille-file Spécifie le nombre maximal de fichiers pouvant entrer dans la file d'attente d'impression. Les valeurs admises vont de 4 à 32. La valeur par défaut est 10.
  /T Retire tous les fichiers de la file d'attente d'impression.
  /C Retire des fichiers de la file d'attente d'impression. Vous pouvez spécifier les commutateurs /C et /P dans la même ligne de commande. Lorsque le commutateur /C précède une liste de fichiers, il s'applique à tous les fichiers qui le suivent, jusqu'à ce que PRINT rencontre le commutateur /P, qu'elle applique au fichier précédant ce commutateur. Lorsque le commutateur /C suit un nom de fichier, il s'applique à ce fichier et à tous les fichiers suivants, jusqu'à ce que PRINT rencontre le commutateur /P, qu'elle applique au fichier précédant ce commutateur.
  /P Ajoute des fichiers à la file d'attente d'impression. Vous pouvez spécifier les commutateurs /C et /P dans la même ligne de commande. Lorsque le commutateur /P précède une liste de fichiers, il s'applique à tous les fichiers qui le suivent, jusqu'à ce que PRINT rencontre le commutateur /C, qu'elle applique au fichier précédant ce commutateur. Lorsque le commutateur /P suit un nom de fichier, il s'applique à ce fichier et à tous les fichiers suivants, jusqu'à ce que PRINT rencontre le commutateur /P, qu'elle applique au fichier précédant ce commutateur.
Pour installer PRINT en utilisant les paramètres par défaut ou afficher le contenu de la file d'attente d'impression sans la modifier, utilisez la syntaxe suivante: print
 
prompt Change l'invite de commande
  PROMPT [texte]
  texte spécifie une nouvelle invite.
L'invite peut être composée de caractères normaux et des codes suivants :
$A	& (signe &)
$B	| (barre verticale)
$C	( (parenthèse gauche)
$D	date actuelle
$E	code ECHAP (code ASCII 27)
$F	) (parenthèse droite)
$G	> (signe supérieur)
$H	retour arrière (efface le caractère précédent)
$L	< (signe inférieur)
$N	lecteur en cours
$P	lecteur et chemin d'accès en cours
$Q	= (signe égal)
$S	(espace)
$T	heure en cours
$_	retour chariot et saut de ligne
rd Supprime un répertoire.
  rmdir [/S] [/Q] [lecteur:]chemin
  rd [/S] [/Q] [lecteur:]chemin
  /S Supprime tous les répertoires et les fichiers dans le répertoire spécifié en plus du répertoire lui-même. Utilisé pour supprimer une arborescence.
  /Q Mode silencieux, ne demande pas de confirmation pour supprimer une arborescence de répertoires avec /S.
 
rem Indique un commentaire dans un fichier de commandes ou dans CONFIG.SYS.
  rem [commentaire]
 
ren Renomme un ou plusieurs fichiers.
  rename [lecteur:][chemin]nom_de_fichier1 nom_de_fichier2.
  ren [lecteur:][chemin]nom_de_fichier1 nom_de_fichier2.
    Vous ne pouvez pas spécifier un nouveau lecteur pour votre destination.
 
set Affiche, définit ou supprime des variables d'environnement de MS-DOS. Les variables d'environnement sont utilisées pour contrôler le comportement de certains fichiers de commandes et programmes de commandes, ainsi que l'apparence et le fonctionnement de MS-DOS. La commande SET est souvent utilisée dans les fichiers AUTOEXEC.BAT et CONFIG.SYS pour définir des variables d'environnement chaque fois que vous lancez MS-DOS.
  set [variable=[chaîne]]
  variable Précise la variable à définir ou à modifier.
  chaîne Précise la chaîne à associer à la variable précisée.
 
setver Définit le numéro de version que MS-DOS peut renvoyer à certains programmes ou gestionnaires de périphérique. Vous pouvez aussi utiliser cette commande pour afficher et modifier la table de versions qui affiche le nom des programmes et le numéro de la version de MS-DOS sous laquelle ils peuvent être exécutés. Si vous utilisez un programme qui n'a pas été mis à jour pour cette version de MS-DOS, vous pouvez l'ajouter à la table de versions avec la commande SETVER.
  setver [lecteur:chemin][fichier n.nn]
  setver [lecteur:chemin][fichier [/DELETE [/QUIET]]
  [lecteur:chemin] Précisent l'emplacement du fichier SETVER.EXE.
  fichier Précise le nom du programme (qui porte généralement l'extension .EXE ou .COM) que vous voulez ajouter à la table de versions. Vous ne pouvez pas utiliser les caractères génériques (* ou ?).
  n.nn Précise le numéro de version de MS-DOS (3.3 ou 4.01, par exemple) que MS-DOS peut renvoyer à certains programmes.
  /DELETE Supprime de la table de versions le fichier programme précisé. Vous pouvez abréger ce commutateur en /D.
  /QUIET Masque le message généralement affiché pendant la suppression d'une entrée provenant de la table de versions.
    Pour afficher la table de versions en cours, utilisez la syntaxe suivante:
  setver [lecteur:chemin] MS-DOS affiche deux colonnes: celle de gauche contient la liste des noms des fichiers programme, celle de droite la version de MS-DOS sous laquelle chaque programme peut être exécuté.
 
share Lance le programme Share, qui installe le partage et le verrouillage de fichiers sur les disques durs et les lecteurs réseau.
  share [/F:espace] [/L:verrous]
  Dans le fichier CONFIG.SYS, utilisez la syntaxe suivante:
  install=[[lecteur:]chemin]SHARE.EXE [/F:espace] [/L:verrous]
  [lecteur:]chemin Précise l'emplacement du fichier SHARE.EXE.
  /F:espace Réserve de l'espace (exprimé en octets) pour la zone de stockage que MS-DOS utilise pour enregistrer les informations relatives au partage. La valeur par défaut est 2048.
  /L:verrous Définit le nombre de fichiers qui peuvent être verrouillés simultanément. La valeur par défaut est 20.
 
shell Précise le nom et l'emplacement de l'interpréteur de commandes que MS-DOS doit utiliser. Cette commmande ne s'utilise que dans le fichier CONFIG.SYS. Si vous voulez utiliser votre propre interpréteur de commandes (au lieu du fichier COMMAND.COM), vous devez préciser son nom en ajoutant la commande SHELL au fichier CONFIG.SYS.
  shell=[[lecteur:]chemin]fichier [paramètres]
  [[lecteur:]chemin]fichier Précisent l'emplacement et le nom de l'interpréteur de commandes à utiliser.
    paramètres Précise tout paramètre ou commutateur de la ligne de commande pouvant être utilisé avec l'interpréteur de commandes précisé.
 
submenu Définit un élément de menu de démarrage qui propose une autre liste de choix lorsque vous le sélectionnez. S'utilise uniquement dans un bloc de menu du fichier CONFIG.SYS. Le menu de démarrage affiche une liste de choix lorsque vous allumez l'ordinateur. Pour le constituer, vous devez utiliser des commandes particulières dans le fichier CONFIG.SYS. Chaque élément du menu correspond en fait à un groupe de commandes de ce fichier, ou "bloc de configuration". A chaque fois que vous démarrez votre ordinateur, ce menu vous permet de choisir une configuration parmi celles que vous avez définies.
  submenu=nom bloc[,texte menu]
  nom bloc Spécifie le bloc de menu associé à l'élément. Ce bloc, qui peut contenir des commandes de définition de menu, doit être défini sur une autre ligne du fichier CONFIG.SYS. Contrairement au bloc de menu principal, qui doit porter le nom [MENU], les blocs de sous-menu peuvent porter un nom quelconque. Si MS-DOS ne trouve pas de bloc du nom spécifié, l'élément n'apparaît pas dans le menu de démarrage. Les noms de bloc ne doivent pas dépasser 70 caractères. La plupart des caractères imprimables sont autorisés, à l'exception des barres obliques inverses (\), barres obliques (/), virgules, points-virgules (;), signes égal (=) et crochets ([ et ]). Les espaces ne sont pas admis.
  texte menu Spécifie le texte de l'élément de menu. Si vous ne l'indiquez pas, MS-DOS affiche le nom du bloc associé. Les textes d'élément ne doivent pas dépasser 70 caractères et acceptent tous les caractères.
 
subst Associe un chemin à une lettre de lecteur.
  subst [lect1: [lect2:]chemin]
  subst lect1: /D
  lect1: Lecteur virtuel auquel vous voulez affecter un chemin.
  [lect2:]chemin Lecteur physique et chemin que vous voulez affecter à un lecteur virtuel.
  /D Supprime un lecteur substitué (virtuel).
subst sans paramètres affiche la liste des lecteurs virtuels en cours.
 
sys Crée un disque de démarrage en y copiant les fichiers système MS-DOS cachés (IO.SYS et MSDOS.SYS), l'interpréteur de commande MS-DOS (COMMAND.COM), et la partie de MS-DOS qui permet au disque d'accéder aux lecteurs compressés (DRVSPACE.BIN). (SYS copie DRVSPACE.BIN uniquement si le fichier DRVSPACE.BIN se trouve dans le répertoire racine du lecteur ou répertoire source.) IO.SYS, MSDOS.SYS et DRVSPACE.BIN sont des fichiers cachés ; normalement, ils n'apparaissent donc pas lorsque vous tapez la commande DIR. Pour voir ces fichiers, vous devez tapez la commande DIR /A.
  sys [lecteur1:][chemin] lecteur2:
  [lecteur1:][chemin] Spécifie l'emplacement des fichiers système. Si vous n'indiquez pas de chemin d'accès, MS-DOS les recherche dans le répertoire racine du lecteur en cours.
  lecteur2: Spécifie le lecteur vers lequel vous souhaitez copier les fichiers système. Vous pouvez les copier dans le répertoire racine mais pas dans un sous-répertoire.
time Affiche ou modifie l'heure système.
  time [heures:[minutes[:secondes[.centièmes]]][A|P]]
  heures Spécifie l'heure. Les valeurs admises vont de 0 à 23.
  minutes Spécifie les minutes. Les valeurs admises vont de 0 à 59.
  secondes Spécifie les secondes. Les valeurs admises vont de 0 à 59.
  centièmes Spécifie les centièmes. Les valeurs admises vont de 0 à 99.
  A|P Spécifie les heures avant midi (A) ou après midi (P) si vous avez choisi le format d'heure de 12 heures. Si vous indiquez une heure valide pour ce format sans spécifier de paramètre, MS-DOS utilise la valeur A.
    TIME sans paramètres affiche l'heure en cours et demande une nouvelle heure. Appuyez sur ENTRÉE pour conserver la même heure.
 
tree Affiche graphiquement la structure de dossiers d'un lecteur ou d'un chemin.
  tree [lecteur:][chemin] [/F] [/A]
  /F Affiche le nom des fichiers de chaque répertoire.
  /A Utilise ASCII au lieu des caractères étendus.
 
type Affiche le contenu d'un ou plusieurs fichiers texte.
  type [lecteur:][chemin]nom_de_fichier
 
undelete Restaure les fichiers supprimés à l'aide de la commande DEL. UNDELETE offre trois niveaux de protection contre la suppression involontaire des fichiers: la protection par Sentinelle, la protection par Traqueur et la protection Standard.
  undelete [[lecteur:][chemin]fichier] [/DT|/DS|/DOS] [/LIST|/ALL|/PURGE[lecteur]|/STATUS|/LOAD|/UNLOAD|/S[lecteur]|/Tlecteur[-entrées]]
  [lecteur:][chemin]fichier Spécifie l'emplacement et le nom du ou des fichiers à récupérer. Par défaut, UNDELETE restaure tous les fichiers supprimés du répertoire en cours.
  /LIST Affiche la liste des fichiers supprimés pouvant être récupérés, mais ne les restaure pas. Les données affichées dépendent du paramètre [lecteur:][chemin]fichier et des commutateurs /DT, /DS et /DOS spécifiés.
  /ALL Restaure les fichiers supprimés sans demander confirmation, en utilisant la méthode Sentinelle si elle est disponible ou la méthode Traqueur dans le cas contraire. Si aucune de ces deux méthodes n'est disponible, UNDELETE restaure ces fichiers depuis le répertoire DOS, en remplaçant par un signe dièse (#) le premier caractère manquant du nom de fichier. S'il existe un autre fichier du même nom, ce commutateur tente de trouver un nom unique en utilisant, dans l'ordre, les caractères suivants : #%&0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.
  /DOS Récupère uniquement les fichiers supprimés par MS-DOS, en vous invitant à confirmer l'opération pour chacun d'entre eux. S'il existe un fichier de suivi des suppressions, UNDELETE l'ignore lorsque vous spécifiez ce commutateur.
  /DT Récupère uniquement les fichiers répertoriés comme fichiers supprimés, en vous invitant à confirmer l'opération pour chacun d'entre eux.
  /DS Récupère uniquement les fichiers figurant dans le répertoire SENTINELLE, en vous invitant à confirmer l'opération pour chacun d'entre eux.
  /LOAD Charge en mémoire le programme résident Undelete en utilisant les informations définies dans le fichier UNDELETE.INI. Si ce fichier n'existe pas, UNDELETE utilise les valeurs par défaut.
  /UNLOAD Retire le programme Undelete de la mémoire ; il devient donc impossible de restaurer les fichiers supprimés.
  /PURGE[lecteur] Supprime le contenu du répertoire SENTINELLE. Si vous ne spécifiez pas de lecteur, UNDELETE recherche ce répertoire sur le lecteur en cours.
  /STATUS Indique le type de protection contre la suppression en vigueur sur chacun des lecteurs.
  /S[lecteur] Active la méthode sentinelle et charge en mémoire le programme résident UNDELETE, qui enregistre les données permettant de récupérer les fichiers supprimés du lecteur spécifié, par défaut le lecteur en cours. Lorsque vous spécifiez le commutateur /S, UNDELETE est chargé en mémoire à l'aide des informations définies dans le fichier UNDELETE.INI.
  /Tlecteur[-entrées] Active la méthode Traqueur et charge en mémoire le programme résident UNDELETE, qui enregistre les données permettant de récupérer les fichiers supprimés. Le paramètre lecteur, qui est obligatoire, désigne le lecteur de disque pour lequel vous souhaitez conserver le suivi des suppressions. Le paramètre entrées, qui est facultatif, spécifie le nombre maximal d'entrées que peut contenir le fichier de suivi des suppressions (PCTRACKR.DEL). Les valeurs admises par ce paramètre sont comprises entre 1 et 999, la valeur par défaut dépendant du type de disque concerné.
 
unformat Restaure un disque effacé par une commande FORMAT.UNFORMAT s'applique uniquement aux disques durs intégrés et aux disquettes, et non aux lecteurs réseau. Cette commande permet également de restaurer une table de partition de disque altérée sur un disque dur.
  unformat lecteur: [/L] [/TEST] [/P]
  lecteur: Spécifie le lecteur de disque sur lequel se trouvent les fichiers à restaurer.
  /L Affiche la liste de tous les fichiers et sous-répertoires trouvés par la commande UNFORMAT. Utilisée sans ce commutateur, UNFORMAT n'affiche que les sous-répertoires et fichiers fragmentés. Appuyez sur CTRL+S pour interrompre le défilement de la liste, et sur une touche quelconque pour le reprendre.
  /TEST Indique comment UNFORMAT reconstitue les données sur le disque, sans annuler son formatage.
  /P Envoie des messages à l'imprimante connectée au port LPT1.
 
ver Affiche le numéro de la version de MS-DOS utilisée.
  ver
 
winver Affiche le numéro de la version de Windows utilisée.
  winver
 
xcopy Copie des fichiers et des arborescences de répertoires.
  XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/EXCLUDE:fich1[+fich2][+fich3]...]
  source Spécifie le ou les fichiers à copier.
  destination Spécifie l'emplacement et/ou le nom de nouveaux fichiers.
  /A Copie uniquement les fichiers ayant l'attribut archive, ne modifie pas l'attribut.
  /M Copie uniquement les fichiers ayant l'attribut archive, désactive l'attribut archive.
  /D : j-m-a Copie les fichiers modifiés à partir de la date spécifiée. Si aucune date n'est donnée, copie uniquement les fichiers dont l'heure source est plus récente que l'heure de destination.
  /EXCLUDE:fich1[+fich2][+fich3]... Spécifie une liste de fichiers contenant des chaînes. Chaque chaîne doit être placée sur une ligne séparée dans le fichier. Lorsque l'une des chaînes se retrouve dans le chemin d'accès absolu du fichier devant être copié, ce fichier est exclu de la copie. Par exemple, spécifier une chaîne telle que \obj\ ou .ob exclura respectivement tous les fichiers situés sous le répertoire obj ou tous les fichiers dont l'extension est .obj.
  /P Avertissement avant la création de chaque fichier de destination.
  /S Copie les répertoires et sous-répertoires à l'exception des répertoires vides.
  /E Copie les répertoires et sous-répertoires, y compris les répertoires vides. Identique à /S /E. Peut être utilisé pour modifier /T.
  /V Vérifie chaque nouveau fichier.
  /W Vous demande d'appuyer sur une touche avant la copie.
  /C Continuer la copie même si des erreurs se produisent.
  /I Si la destination n'existe pas et que plus d'un fichier est copié, considérer la destination comme devant être un répertoire.
  /Q N'affiche pas les noms de fichiers lors de la copie.
  /F Affiche les noms de source et de destination complets lors de la copie.
  /L Affiche les fichiers devant être copié.
  /G Permet la copie des fichiers cryptés vers des destinations qui ne prennent pas en charge le cryptage.
  /H Copie également les fichiers cachés et les fichiers système.
  /R Remplace les fichiers en lecture seule.
  /T Crée la structure de répertoires mais ne copie pas les fichiers. N'inclut pas les répertoires ou sous-répertoires vides. /T /E incluent les répertoires et sous-répertoires vides.
  /U Copie seulement les fichiers existants déjà dans la destination.
  /K Copie les attributs. La commande normale Xcopy rétablira les attributs de lecture seule.
  /N Copie en utilisant les noms courts générés.
  /O Copie les fichiers d'appartenance et les informations d'ACL.
  /X Copie les paramètres d'audit de fichiers (implique /O).
  /Y Supprime la demande de confirmation de remplacement de fichiers de destination existants.
  /-Y Provoque la demande de confirmation de remplacement d'un fichier de destination existant.
Le commutateur /Y peut être présent dans la variable d'environnement COPYCMD. Il peut être remplacée par /-Y dans la ligne de commande.

 

 

 

Commandes DOS Aide anglais

De B.C.S. Computers bvba, liste des commandes DOS à cette adresse
http://www.bcscomputers.be/support/tips/dosxp.asp

 

Si jamais cette liste est enlevée de Internet la voici.

APPEND Allows programs to open data files as if they were in the current directory
ARP Displays and modifies the IP-to-Physical address ARP translation tables.
ASSOC Displays or modifies file extension associations.
AT Schedules commands and programs to run on a computer.
ATTRIB Displays or changes file attributes.
ATMADM Windows ATM Call Manager Statistics.
BOOTCFG Configures the boot.ini file.
BREAK Sets or clears extended CTRL+C checking.
CACLS Displays or modifies access control lists (ACLs) of files.
CALL Calls one batch program from another.
CD Displays the name of or changes the current directory.
CHCP Displays or sets the active code page number.
CHDIR Displays the name of or changes the current directory.
CHKDSK Checks a disk and displays a status report.
CHKNTFS Displays or modifies the checking of disk at boot time.
CIPHER Displays or alters the encryption of directories [files] on NTFS partitions.
CLS Clears the screen.
CMD Starts a new instance of the Windows command interpreter.
CMSTP Installs or removes a Connection Manager service profiles.
COLOR Sets the default console foreground and background colors.
COMMAND Command Interpreter
COMP Compares the contents of two files or sets of files.
COMPACT Displays or alters the compression of files on NTFS partitions.
CONVERT Converts FAT volumes to NTFS.
COPY Copies one or more files to another location.
CSCRIPT Microsoft Windows Script Host
DATE Displays or sets the date.
DEBUG A program testing and editing tool.
DEFRAG Disk Defragmenter.
DEL Deletes one or more files.
DIR Displays a list of files and subdirectories in a directory.
DISKCOMP Compares the contents of two floppy disks.
DISKCOPY Copies the contents of one floppy disk to another.
DISKPART Disk Partition Utility.
DOSKEY Edits command lines, recalls Windows commands, and creates macros.
DRIVERQUERY Enables an administrator to enumerate and display the list of
installed device drivers as well as their properties.
ECHO Displays messages, or turns command echoing on or off.
EDIT MS-DOS Editor
EDLIN A line-oriented text editor.
ENDLOCAL Ends localization of environment changes in a batch file.
ERASE Deletes one or more files.
EVENTCREATE Create a custom event ID and message in a specified event log.
EXIT Quits the CMD.EXE program (command interpreter).
FC Compares two files or sets of files, and displays the differences
between them.
FIND Searches for a text string in a file or files.
FINDSTR Searches for strings in files.
FOR Runs a specified command for each file in a set of files.
FORMAT Formats a disk for use with Windows.
FTP Transfers files to and from a computer running an FTP server service
FTYPE Displays or modifies file types used in file extension associations.
GOTO Directs the Windows command interpreter to a labeled line in a
batch program.
GRAFTABL Enables Windows to display an extended character set in graphics
mode.
HELP Provides Help information for Windows commands.
IF Performs conditional processing in batch programs.
IPCONFIG IP Configuration.
KB16 Configures a keyboard for a specific language.
LABEL Creates, changes, or deletes the volume label of a disk.
LOADFIX Loads a program above the first 64K of memory, and runs the program.
MD Creates a directory.
MEM Displays the amount of used and free memory in your system.
MKDIR Creates a directory.
MODE Configures a system device.
MORE Displays output one screen at a time.
MOVE Moves one or more files from one directory to another directory.
PATH Displays or sets a search path for executable files.
PAUSE Suspends processing of a batch file and displays a message.
PING Ping a network connection
POPD Restores the previous value of the current directory saved by PUSHD.
PRINT Prints a text file.
PROMPT Changes the Windows command prompt.
PUSHD Saves the current directory then changes it.
RD Removes a directory.
RECOVER Recovers readable information from a bad or defective disk.
REM Records comments (remarks) in batch files or CONFIG.SYS.
REN Renames a file or files.
RENAME Renames a file or files.
REPLACE Replaces files.
RMDIR Removes a directory.
SET Displays, sets, or removes Windows environment variables.
SETLOCAL Begins localization of environment changes in a batch file.
SHIFT Shifts the position of replaceable parameters in batch files.
SORT Sorts input.
START Starts a separate window to run a specified program or command.
SUBST Associates a path with a drive letter.
TFTP Transfers files to and from a remote computer running the TFTP service.
TIME Displays or sets the system time.
TITLE Sets the window title for a CMD.EXE session.
TREE Graphically displays the directory structure of a drive or path.
TYPE Displays the contents of a text file.
TYPEPERF Writes performance data to the command window or to a log file.
TRACERPT Processes binary Event Trace Session log files or real-time streams
VER Displays the Windows version.
VERIFY Tells Windows whether to verify that your files are written
correctly to a disk.
VOL Displays a disk volume label and serial number.
XCOPY Copies files and directory trees.


Command Definitions

APPEND
Allows programs to open data files in specified directories as if they were in
the current directory.

APPEND [[drive:]path[;...]] [/X[:ON | :OFF]] [/PATH:ON | /PATH:OFF] [/E]
APPEND ;

[drive:]path Specifies a drive and directory to append.
/X:ON Applies appended directories to file searches and
application execution.
/X:OFF Applies appended directories only to requests to open files.
/X:OFF is the default setting.
/PATH:ON Applies appended directories to file requests that already
specify a path. /PATH:ON is the default setting.
/PATH:OFF Turns off the effect of /PATH:ON.
/E Stores a copy of the appended directory list in an environment
variable named APPEND. /E may be used only the first time
you use APPEND after starting your system.

Type APPEND ; to clear the appended directory list.
Type APPEND without parameters to display the appended directory list.

ARP
Displays and modifies the IP-to-Physical address translation tables used by
address resolution protocol (ARP).

ARP -s inet_addr eth_addr [if_addr]
ARP -d inet_addr [if_addr]
ARP -a [inet_addr] [-N if_addr]

-a Displays current ARP entries by interrogating the current
protocol data. If inet_addr is specified, the IP and Physical
addresses for only the specified computer are displayed. If
more than one network interface uses ARP, entries for each ARP
table are displayed.
-g Same as -a.
inet_addr Specifies an internet address.
-N if_addr Displays the ARP entries for the network interface specified
by if_addr.
-d Deletes the host specified by inet_addr. inet_addr may be
wildcarded with * to delete all hosts.
-s Adds the host and associates the Internet address inet_addr
with the Physical address eth_addr. The Physical address is
given as 6 hexadecimal bytes separated by hyphens. The entry
is permanent.
eth_addr Specifies a physical address.
if_addr If present, this specifies the Internet address of the
interface whose address translation table should be modified.
If not present, the first applicable interface will be used.
Example:
> arp -s 157.55.85.212 00-aa-00-62-c6-09 .... Adds a static entry.
> arp -a .... Displays the arp table.



ASSOC
Displays or modifies file extension associations
ASSOC [.ext[=[fileType]]]

.ext Specifies the file extension to associate the file type with
fileType Specifies the file type to associate with the file extension

Type ASSOC without parameters to display the current file associations.
If ASSOC is invoked with just a file extension, it displays the current
file association for that file extension. Specify nothing for the file
type and the command will delete the association for the file extension.

AT
The AT command schedules commands and programs to run on a computer at
a specified time and date. The Schedule service must be running to use
the AT command.

AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
[ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\\computername Specifies a remote computer. Commands are scheduled on the
local computer if this parameter is omitted.
id Is an identification number assigned to a scheduled
command.
/delete Cancels a scheduled command. If id is omitted, all the
scheduled commands on the computer are canceled.
/yes Used with cancel all jobs command when no further
confirmation is desired.
time Specifies the time when command is to run.
/interactive Allows the job to interact with the desktop of the user
who is logged on at the time the job runs.
/every:date[,...] Runs the command on each specified day(s) of the week or
month. If date is omitted, the current day of the month
is assumed.
/next:date[,...] Runs the specified command on the next occurrence of the
day (for example, next Thursday). If date is omitted, the
current day of the month is assumed.
"command" Is the Windows NT command, or batch program to be run.


ATTRIB
Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [drive:][path][filename]
[/S [/D]]

+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
[drive:][path][filename]
Specifies a file or files for attrib to process.
/S Processes matching files in the current folder
and all subfolders.
/D Processes folders as well.



ATMADM
Windows ATM Call Manager

Usage: atmadm [options]
where options are one or more of:
-c List all connections
-a List all registered addresses
-s Display Statistics


BOOTCFG
BOOTCFG /parameter [arguments]

Description:
This command line tool can be used to configure, query, change or
delete the boot entry settings in the BOOT.INI file.

Parameter List:
/Copy Makes a copy of an existing boot entry [operating
systems] section for which you can add OS options to.

/Delete Deletes an existing boot entry in the [operating
systems] section of the BOOT.INI file. You must specify
the entry# to delete.

/Query Displays the current boot entries and their settings.

/Raw Allows the user to specify any switch options to be
added for a specified boot entry.

/Timeout Allows the user to change the Timeout value.

/Default Allows the user to change the Default boot entry.

/EMS Allows the user to configure the /redirect switch
for headless support for a boot entry.

/Debug Allows the user to specify the port and baudrate for
remote debugging for a specified boot entry.

/Addsw Allows the user to add predefined switches for
a specific boot entry.

/Rmsw Allows the user to remove predefined switches for a
specific boot entry.

/Dbg1394 Allows the user to configure 1394 port debugging
for a specified boot entry.

/? Displays this help/usage.

Examples:
BOOTCFG /Copy /?
BOOTCFG /Delete /?
BOOTCFG /Query /?
BOOTCFG /Raw /?
BOOTCFG /Timeout /?
BOOTCFG /EMS /?
BOOTCFG /Debug /?
BOOTCFG /Addsw /?
BOOTCFG /Rmsw /?
BOOTCFG /Dbg1394 /?
BOOTCFG /Default /?
BOOTCFG /?


BREAK
Sets or Clears Extended CTRL+C checking on DOS system

BREAK

This is present for Compatibility with DOS systems. It has no effect
under Windows XP.

If Command Extensions are enabled, and running on the Windows XP
platform, then the BREAK command will enter a hard coded breakpoint
if being debugged by a debugger.

CACLS
Displays or modifies access control lists (ACLs) of files

CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]]
[/P user:perm [...]] [/D user [...]]

filename Displays ACLs.
/T Changes ACLs of specified files in
the current directory and all subdirectories.
/E Edit ACL instead of replacing it.
/C Continue on access denied errors.
/G user:perm Grant specified user access rights.
Perm can be: R Read
W Write
C Change (write)
F Full control

/R user Revoke specified user's access rights (only valid with /E).
/P user:perm Replace specified user's access rights.
Perm can be: N None
R Read
W Write
C Change (write)
F Full control
/D user Deny specified user access.

Wildcards can be used to specify more that one file in a command.
You can specify more than one user in a command.

Abbreviations:

CI - Container Inherit.
The ACE will be inherited by directories.
OI - Object Inherit.
The ACE will be inherited by files.
IO - Inherit Only.
The ACE does not apply to the current file/directory.


CALL
Calls one batch program from another.

CALL [drive:][path]filename [batch-parameters]

batch-parameters Specifies any command-line information required by the
batch program.

If Command Extensions are enabled CALL changes as follows:

CALL command now accepts labels as the target of the CALL. The syntax
is:

CALL :label arguments

A new batch file context is created with the specified arguments and
control is passed to the statement after the label specified. You must
"exit" twice by reaching the end of the batch script file twice. The
first time you read the end, control will return to just after the CALL
statement. The second time will exit the batch script. Type GOTO /?
for a description of the GOTO :EOF extension that will allow you to
"return" from a batch script.

In addition, expansion of batch script argument references (%0, %1,
etc.) have been changed as follows:


%* in a batch script refers to all the arguments (e.g. %1 %2 %3
%4 %5 ...)

Substitution of batch parameters (%n) has been enhanced. You can
now use the following optional syntax:

%~1 - expands %1 removing any surrounding quotes (")
%~f1 - expands %1 to a fully qualified path name
%~d1 - expands %1 to a drive letter only
%~p1 - expands %1 to a path only
%~n1 - expands %1 to a file name only
%~x1 - expands %1 to a file extension only
%~s1 - expanded path contains short names only
%~a1 - expands %1 to file attributes
%~t1 - expands %1 to date/time of file
%~z1 - expands %1 to size of file
%~$PATH:1 - searches the directories listed in the PATH
environment variable and expands %1 to the fully
qualified name of the first one found. If the
environment variable name is not defined or the
file is not found by the search, then this
modifier expands to the empty string

The modifiers can be combined to get compound results:

%~dp1 - expands %1 to a drive letter and path only
%~nx1 - expands %1 to a file name and extension only
%~dp$PATH:1 - searches the directories listed in the PATH
environment variable for %1 and expands to the
drive letter and path of the first one found.
%~ftza1 - expands %1 to a DIR like output line

In the above examples %1 and PATH can be replaced by other
valid values. The %~ syntax is terminated by a valid argument
number. The %~ modifiers may not be used with %*

CD & CHDIR
Displays the name of or changes the current directory.

CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
CD [..]

.. Specifies that you want to change to the parent directory.

Type CD drive: to display the current directory in the specified drive.
Type CD without parameters to display the current drive and directory.

Use the /D switch to change current drive in addition to changing current
directory for a drive.

If Command Extensions are enabled CHDIR changes as follows:

The current directory string is converted to use the same case as
the on disk names. So CD C:\TEMP would actually set the current
directory to C:\Temp if that is the case on disk.

CHDIR command does not treat spaces as delimiters, so it is possible to
CD into a subdirectory name that contains a space without surrounding
the name with quotes. For example:

cd \winnt\profiles\username\programs\start menu

is the same as:

cd "\winnt\profiles\username\programs\start menu"

which is what you would have to type if extensions were disabled.

CHCP
Displays or sets the active code page number.

CHCP [nnn]

nnn Specifies a code page number.

Type CHCP without a parameter to display the active code page number.

CHKDSK
Checks a disk and displays a status report.


CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]


volume Specifies the drive letter (followed by a colon),
mount point, or volume name.
filename FAT/FAT32 only: Specifies the files to check for fragmentation.
/F Fixes errors on the disk.
/V On FAT/FAT32: Displays the full path and name of every file
on the disk.
On NTFS: Displays cleanup messages if any.
/R Locates bad sectors and recovers readable information
(implies /F).
/L:size NTFS only: Changes the log file size to the specified number
of kilobytes. If size is not specified, displays current
size.
/X Forces the volume to dismount first if necessary.
All opened handles to the volume would then be invalid
(implies /F).
/I NTFS only: Performs a less vigorous check of index entries.
/C NTFS only: Skips checking of cycles within the folder
structure.

The /I or /C switch reduces the amount of time required to run Chkdsk by
skipping certain checks of the volume.

CHKNTFS
Displays or modifies the checking of disk at boot time.

CHKNTFS volume [...]
CHKNTFS /D
CHKNTFS /T[:time]
CHKNTFS /X volume [...]
CHKNTFS /C volume [...]

volume Specifies the drive letter (followed by a colon),
mount point, or volume name.
/D Restores the machine to the default behavior; all drives are
checked at boot time and chkdsk is run on those that are
dirty.
/T:time Changes the AUTOCHK initiation countdown time to the
specified amount of time in seconds. If time is not
specified, displays the current setting.
/X Excludes a drive from the default boot-time check. Excluded
drives are not accumulated between command invocations.
/C Schedules a drive to be checked at boot time; chkdsk will run
if the drive is dirty.

If no switches are specified, CHKNTFS will display if the specified drive is
dirty or scheduled to be checked on next reboot.


CIPHER
Displays or alters the encryption of directories [files] on NTFS partitions.

CIPHER [/E | /D] [/S:directory] [/A] [/I] [/F] [/Q] [/H] [pathname [...]]

CIPHER /K

CIPHER /R:filename

CIPHER /U [/N]

CIPHER /W:directory

CIPHER /X[:efsfile] [filename]

/A Operates on files as well as directories. The encrypted file
could become decrypted when it is modified if the parent
directory is not encrypted. It is recommended that you encrypt
the file and the parent directory.
/D Decrypts the specified directories. Directories will be marked
so that files added afterward will not be encrypted.
/E Encrypts the specified directories. Directories will be marked
so that files added afterward will be encrypted.
/F Forces the encryption operation on all specified objects, even
those which are already encrypted. Already-encrypted objects
are skipped by default.
/H Displays files with the hidden or system attributes. These
files are omitted by default.
/I Continues performing the specified operation even after errors
have occurred. By default, CIPHER stops when an error is
encountered.
/K Creates new file encryption key for the user running CIPHER. If
this option is chosen, all the other options will be ignored.
/N This option only works with /U. This will prevent keys being
updated. This is used to find all the encrypted files on the
local drives.
/Q Reports only the most essential information.
/R Generates an EFS recovery agent key and certificate, then writes
them to a .PFX file (containing certificate and private key) and
a .CER file (containing only the certificate). An administrator
may add the contents of the .CER to the EFS recovery policy to
create the recovery agent for users, and import the .PFX to
recover individual files.
/S Performs the specified operation on directories in the given
directory and all subdirectories.
/U Tries to touch all the encrypted files on local drives. This will
update user's file encryption key or recovery agent's key to the
current ones if they are changed. This option does not work with
other options except /N.
/W Removes data from available unused disk space on the entire
volume. If this option is chosen, all other options are ignored.
The directory specified can be anywhere in a local volume. If it
is a mount point or points to a directory in another volume, the
data on that volume will be removed.
/X Backup EFS certificate and keys into file filename. If efsfile is
provided, the current user's certificate(s) used to encrypt the
file will be backed up. Otherwise, the user's current EFS
certificate and keys will be backed up.


directory A directory path.
filename A filename without extensions.
pathname Specifies a pattern, file or directory.
efsfile An encrypted file path.

Used without parameters, CIPHER displays the encryption state of
the current directory and any files it contains. You may use multiple
directory names and wildcards. You must put spaces between multiple
parameters.

CLS
Clears the screen.

CLS

CMD
Starts a new instance of the Windows XP command interpreter

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
[[/S] [/C | /K] string]

/C Carries out the command specified by string and then terminates
/K Carries out the command specified by string but remains
/S Modifies the treatment of string after /C or /K (see below)
/Q Turns echo off
/D Disable execution of AutoRun commands from registry (see below)
/A Causes the output of internal commands to a pipe or file to be ANSI
/U Causes the output of internal commands to a pipe or file to be
Unicode
/T:fg Sets the foreground/background colors (see COLOR /? for more info)
/E:ON Enable command extensions (see below)
/E:OFF Disable command extensions (see below)
/F:ON Enable file and directory name completion characters (see below)
/F:OFF Disable file and directory name completion characters (see below)
/V:ON Enable delayed environment variable expansion using ! as the
delimiter. For example, /V:ON would allow !var! to expand the
variable var at execution time. The var syntax expands variables
at input time, which is quite a different thing when inside of a FOR
loop.
/V:OFF Disable delayed environment expansion.

Note that multiple commands separated by the command separator '&&'
are accepted for string if surrounded by quotes. Also, for compatibility
reasons, /X is the same as /E:ON, /Y is the same as /E:OFF and /R is the
same as /C. Any other switches are ignored.

If /C or /K is specified, then the remainder of the command line after
the switch is processed as a command line, where the following logic is
used to process quote (") characters:

1. If all of the following conditions are met, then quote characters
on the command line are preserved:

- no /S switch
- exactly two quote characters
- no special characters between the two quote characters,
where special is one of: &<>()@^|
- there are one or more whitespace characters between the
the two quote characters
- the string between the two quote characters is the name
of an executable file.

2. Otherwise, old behavior is to see if the first character is
a quote character and if so, strip the leading character and
remove the last quote character on the command line, preserving
any text after the last quote character.

If /D was NOT specified on the command line, then when CMD.EXE starts, it
looks for the following REG_SZ/REG_EXPAND_SZ registry variables, and if
either or both are present, they are executed first.

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun

and/or

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

Command Extensions are enabled by default. You may also disable
extensions for a particular invocation by using the /E:OFF switch. You
can enable or disable extensions for all invocations of CMD.EXE on a
machine and/or user logon session by setting either or both of the
following REG_DWORD values in the registry using REGEDT32.EXE:

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions

and/or

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions

to either 0x1 or 0x0. The user specific setting takes precedence over
the machine setting. The command line switches take precedence over the
registry settings.

The command extensions involve changes and/or additions to the following
commands:


DEL or ERASE


COLOR


CD or CHDIR


MD or MKDIR


PROMPT


PUSHD


POPD


SET


SETLOCAL


ENDLOCAL


IF


FOR


CALL


SHIFT


GOTO


START (also includes changes to external command invocation)


ASSOC


FTYPE

To get specific details, type commandname /? to view the specifics.

Delayed environment variable expansion is NOT enabled by default. You
can enable or disable delayed environment variable expansion for a
particular invocation of CMD.EXE with the /V:ON or /V:OFF switch. You
can enable or disable completion for all invocations of CMD.EXE on a
machine and/or user logon session by setting either or both of the
following REG_DWORD values in the registry using REGEDT32.EXE:

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion

and/or

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DelayedExpansion

to either 0x1 or 0x0. The user specific setting takes precedence over
the machine setting. The command line switches take precedence over the
registry settings.

If delayed environment variable expansion is enabled, then the exclamation
character can be used to substitute the value of an environment variable
at execution time.

File and Directory name completion is NOT enabled by default. You can
enable or disable file name completion for a particular invocation of
CMD.EXE with the /F:ON or /F:OFF switch. You can enable or disable
completion for all invocations of CMD.EXE on a machine and/or user logon
session by setting either or both of the following REG_DWORD values in
the registry using REGEDT32.EXE:

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar

and/or

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar

with the hex value of a control character to use for a particular
function (e.g. 0x4 is Ctrl-D and 0x6 is Ctrl-F). The user specific
settings take precedence over the machine settings. The command line
switches take precedence over the registry settings.

If completion is enabled with the /F:ON switch, the two control
characters used are Ctrl-D for directory name completion and Ctrl-F for
file name completion. To disable a particular completion character in
the registry, use the value for space (0x20) as it is not a valid
control character.

Completion is invoked when you type either of the two control
characters. The completion function takes the path string to the left
of the cursor appends a wild card character to it if none is already
present and builds up a list of paths that match. It then displays the
first matching path. If no paths match, it just beeps and leaves the
display alone. Thereafter, repeated pressing of the same control
character will cycle through the list of matching paths. Pressing the
Shift key with the control character will move through the list
backwards. If you edit the line in any way and press the control
character again, the saved list of matching paths is discarded and a new
one generated. The same occurs if you switch between file and directory
name completion. The only difference between the two control characters
is the file completion character matches both file and directory names,
while the directory completion character only matches directory names.
If file completion is used on any of the built in directory commands
(CD, MD or RD) then directory completion is assumed.

The completion code deals correctly with file names that contain spaces
or other special characters by placing quotes around the matching path.
Also, if you back up, then invoke completion from within a line, the
text to the right of the cursor at the point completion was invoked is
discarded.

The special characters that require quotes are:
<space>
&()[]{}^=;!'+,`~

CMSTP
Installs or removes a Connection Manager service profile.
Used without optional parameters, cmstp installs a service profile with default
settings appropriate to the operating system and to the user's permissions.

ServiceProfileFileName.exe /q:a
/c:"cmstp.exe ServiceProfileFileName.inf [/nf] [/ni] [/ns] [/s] [/su] [/u]"

cmstp.exe [/nf] [/ni] [/ns] [/s] [/su] [/u]
"[Drive:][Path]ServiceProfileFileName.inf"

ServiceProfileFileName.exe : Required for Syntax 1 but not valid for Syntax 2.
Specifies, by name, the installation package that contains the
profile that you want to install.

/q:a Required for Syntax 1 but not valid for Syntax 2.
Specifies that the profile should be installed without prompting the user.
The verification message that the installation has succeeded will still appear.

[Drive:][Path]ServiceProfileFileName.inf : Required. Specifies, by name,
the configuration file that determines how the profile should be installed.
The [Drive:][Path] parameter is not valid for Syntax 1.

/nf Specifies that the support files should not be installed.

/ni Specifies that a desktop icon should not be created.
This parameter is only valid for Windows 95, 98, NT 4.0, or Windows ME.

/ns Specifies that a desktop shortcut should not be created.
This parameter is only valid for Windows 2000 or XP.

/s Specifies that the service profile should be installed or uninstalled silently
(without prompting for user response or displaying verification message).
this is the only parameter that you can use in combination with /u.

/su Specifies that the service profile should be installed for a single user
rather than for all users.
This parameter is only valid for Windows 2000 or XP.

/u Specifies that the service profile should be uninstalled.

/? Displays help at the command prompt.


• Syntax 1 is the typical syntax used in a custom installation application.
To use this syntax, you must run cmstp from the directory that
contains the ServiceProfileFileName.exe file.




COLOR
Sets the default console foreground and background colors.

COLOR [attr]

attr Specifies color attribute of console output

Color attributes are specified by TWO hex digits -- the first
corresponds to the background; the second the foreground. Each digit
can be any of the following values:

0 = Black 8 = Gray Also See: 7.4 Color Codes
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White

If no argument is given, this command restores the color to what it was
when CMD.EXE started. This value either comes from the current console
window, the /T command line switch or from the DefaultColor registry
value.

The COLOR command sets ERRORLEVEL to 1 if an attempt is made to execute
the COLOR command with a foreground and background color that are the
same.

Example: "COLOR fc" produces light red on bright white

COMMAND
Starts a new instance of the MS-DOS command interpreter.

COMMAND [[drive:]path] [device] [/E:nnnnn] [/P] [/C string] [/MSG]

[drive:]path Specifies the directory containing COMMAND.COM file.
device Specifies the device to use for command input and output.
/E:nnnnn Sets the initial environment size to nnnnn bytes.
/P Makes the new command interpreter permanent (can't exit).
/C string Carries out the command specified by string, and then stops.
/MSG Specifies that all error messages be stored in memory. You
need to specify /P with this switch.

COMP
Compares the contents of two files or sets of files.

COMP [data1] [data2] [/D] [/A] [/L] [/N=number] [/C] [/OFF[LINE]]

data1 Specifies location and name(s) of first file(s) to compare.
data2 Specifies location and name(s) of second files to compare.
/D Displays differences in decimal format.
/A Displays differences in ASCII characters.
/L Displays line numbers for differences.
/N=number Compares only the first specified number of lines in each file.
/C Disregards case of ASCII letters when comparing files.
/OFF[LINE] Do not skip files with offline attribute set.

To compare sets of files, use wildcards in data1 and data2 parameters.

COMPACT
Displays or alters the compression of files on NTFS partitions.

COMPACT [/C | /U] [/S[:dir]] [/A] [/I] [/F] [/Q] [filename [...]]

/C Compresses the specified files. Directories will be marked
so that files added afterward will be compressed.
/U Uncompresses the specified files. Directories will be marked
so that files added afterward will not be compressed.
/S Performs the specified operation on files in the given
directory and all subdirectories. Default "dir" is the
current directory.
/A Displays files with the hidden or system attributes. These
files are omitted by default.
/I Continues performing the specified operation even after errors
have occurred. By default, COMPACT stops when an error is
encountered.
/F Forces the compress operation on all specified files, even
those which are already compressed. Already-compressed files
are skipped by default.
/Q Reports only the most essential information.
filename Specifies a pattern, file, or directory.

Used without parameters, COMPACT displays the compression state of
the current directory and any files it contains. You may use multiple
filenames and wildcards. You must put spaces between multiple
parameters.

CONVERT
Converts FAT volumes to NTFS.

CONVERT volume /FS:NTFS [/V] [/CvtArea:filename] [/NoSecurity] [/X]

volume Specifies the drive letter (followed by a colon),
mount point, or volume name.
/FS:NTFS Specifies that the volume is to be converted to NTFS.
/V Specifies that Convert should be run in verbose mode.
/CvtArea:filename
Specifies a contiguous file in the root directory to be
the place holder for NTFS system files.
/NoSecurity Specifies the converted files and directories security
settings to be accessible by everyone.
/X Forces the volume to dismount first if necessary.
All opened handles to the volume would then be invalid.

COPY
Copies one or more files to another location.

COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
[+ source [/A | /B] [+ ...]] [destination [/A | /B]]

source Specifies the file or files to be copied.
/A Indicates an ASCII text file.
/B Indicates a binary file.
/D Allow the destination file to be created decrypted
destination Specifies the directory and/or filename for the new file(s).
/V Verifies that new files are written correctly.
/N Uses short filename, if available, when copying a file with a
non-8dot3 name.
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.
/Z Copies networked files in restartable mode.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line. Default is
to prompt on overwrites unless COPY command is being executed from
within a batch script.

To append files, specify a single file for destination, but multiple files
for source (using wildcards or file1+file2+file3 format).

CSCRIPT
Microsoft (R) Windows Script Host

Usage: CScript scriptname.extension [option...] [arguments...]

Options:
//B Batch mode: Suppresses script errors and prompts from displaying
//D Enable Active Debugging
//E:engine Use engine for executing script
//H:CScript Changes the default script host to CScript.exe
//H:WScript Changes the default script host to WScript.exe (default)
//I Interactive mode (default, opposite of //B)
//Job:xxxx Execute a WSF job
//Logo Display logo (default)
//Nologo Prevent logo display: No banner will be shown at execution time
//S Save current command line options for this user
//T:nn Time out in seconds: Maximum time a script is permitted to run
//X Execute script in debugger
//U Use Unicode for redirected I/O from the console

DATE
Displays or sets the date.

DATE [/T | date]

Type DATE without parameters to display the current date setting and
a prompt for a new one. Press ENTER to keep the same date.

If Command Extensions are enabled the DATE command supports
the /T switch which tells the command to just output the
current date, without prompting for a new date.

DEBUG
Runs Debug, a program testing and editing tool.

DEBUG [[drive:][path]filename [testfile-parameters]]

[drive:][path]filename Specifies the file you want to test.
testfile-parameters Specifies command-line information required by
the file you want to test.

After Debug starts, type ? to display a list of debugging commands.


DEL & ERASE
Deletes one or more files.

DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

names Specifies a list of one or more files or directories.
Wildcards may be used to delete multiple files. If a
directory is specified, all files within the directory
will be deleted.

/P Prompts for confirmation before deleting each file.
/F Force deleting of read-only files.
/S Delete specified files from all subdirectories.
/Q Quiet mode, do not ask if ok to delete on global wildcard
/A Selects files to delete based on attributes
attributes R Read-only files S System files
H Hidden files A Files ready for archiving
- Prefix meaning not

If Command Extensions are enabled DEL and ERASE change as follows:

The display semantics of the /S switch are reversed in that it shows
you only the files that are deleted, not the ones it could not find.

EVENTCREATE
This command line tool enables an administrator to create
a custom event ID and message in a specified event log.

EVENTCREATE [/S system [/U username [/P [password]]]] /ID eventid
[/L logname] [/SO srcname] /T type /D description

/S system Specifies the remote system to connect to.

/U [domain\]user Specifies the user context under which
the command should execute.

/P [password] Specifies the password for the given
user context. Prompts for input if omitted.

/L logname Specifies the event log to create
an event in.

/T type Specifies the type of event to create.
Valid types: ERROR, WARNING, INFORMATION.

/SO source Specifies the source to use for the
event. A valid source can be any string
and should represent the application or
component that is generating the event.

/ID id Specifies the event ID for the event. A
valid custom message ID is in the range
of 1 - 1000.

/D description Specifies the description to be set for
the newly creating event.

/? Displays this help/usage.


EVENTCREATE /T ERROR /ID 100
/L APPLICATION /D "Create an event in application log"

EVENTCREATE /T ERROR /ID 999 /L APPLICATION
/SO WinWord /D "new source Winword in application log"

EVENTCREATE /S system /T ERROR /ID 100
/L APPLICATION /D "Remote system without user credentials"

EVENTCREATE /S system /U user /P password /ID 100 /T ERROR
/L APPLICATION /D "Remote machine with user credentials"

EVENTCREATE /S system /U domain\user /ID 100 /T WARNING
/SO MyBatchFile.cmd /D "Maintenance script user logon failed"

DIR
Displays a list of files and subdirectories in a directory.

DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
[/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

[drive:][path][filename]
Specifies drive, directory, and/or files to list.

/A Displays files with specified attributes.
attributes D Directories R Read-only files
H Hidden files A Files ready for archiving
S System files - Prefix meaning not
/B Uses bare format (no heading information or summary).
/C Display the thousand separator in file sizes. This is the
default. Use /-C to disable display of separator.
/D Same as wide but files are list sorted by column.
/L Uses lowercase.
/N New long list format where filenames are on the far right.
/O List by files in sorted order.
sortorder N By name (alphabetic) S By size (smallest first)
E By extension (alphabetic) D By date/time (oldest first)
G Group directories first - Prefix to reverse order
/P Pauses after each screenful of information.
/Q Display the owner of the file.
/S Displays files in specified directory and all subdirectories.
/T Controls which time field displayed or used for sorting
timefield C Creation
A Last Access
W Last Written
/W Uses wide list format.
/X This displays the short names generated for non-8dot3 file
names. The format is that of /N with the short name inserted
before the long name. If no short name is present, blanks are
displayed in its place.
/4 Displays four-digit years

Switches may be preset in the DIRCMD environment variable. Override
preset switches by prefixing any switch with - (hyphen)--for example, /-W.

DEFRAG
Windows Disk Defragmenter

Usage:
defrag [-a] [-f] [-v] [-?]
volume drive letter or mount point (d: or d:\vol\mountpoint)
-a Analyze only
-f Force defragmentation even if free space is low
-v Verbose output
-? Display this help text

DISKCOMP
Compares the contents of two floppy disks.

DISKCOMP [drive1: [drive2:]]


DISKCOPY
Copies the contents of one floppy disk to another.

DISKCOPY [drive1: [drive2:]] [/V]

/V Verifies that the information is copied correctly.

The two floppy disks must be the same type.
You may specify the same drive for drive1 and drive2.

DISKPART
Microsoft DiskPart
diskpart [/s <script>] [/?]

/s <script> - Use a DiskPart script.
/? - Show help screen.

DOSKEY
Edits command lines, recalls Windows XP commands, and creates macros.

DOSKEY [/REINSTALL] [/LISTSIZE=size] [/MACROS[:ALL | :exename]]
[/HISTORY] [/INSERT | /OVERSTRIKE] [/EXENAME=exename] [/MACROFILE=filename]
[macroname=[text]]

/REINSTALL Installs a new copy of Doskey.
/LISTSIZE=size Sets size of command history buffer.
/MACROS Displays all Doskey macros.
/MACROS:ALL Displays all Doskey macros for all executables which have
Doskey macros.
/MACROS:exename Displays all Doskey macros for the given executable.
/HISTORY Displays all commands stored in memory.
/INSERT Specifies that new text you type is inserted in old text.
/OVERSTRIKE Specifies that new text overwrites old text.
/EXENAME=exename Specifies the executable.
/MACROFILE=filename Specifies a file of macros to install.
macroname Specifies a name for a macro you create.
text Specifies commands you want to record.

UP and DOWN ARROWS recall commands; ESC clears command line; F7 displays
command history; ALT+F7 clears command history; F8 searches command
history; F9 selects a command by number; ALT+F10 clears macro definitions.

The following are some special codes in Doskey macro definitions:
$T Command separator. Allows multiple commands in a macro.
$1-$9 Batch parameters. Equivalent to %1-%9 in batch programs.
$* Symbol replaced by everything following macro name on command line.

DRIVERQUERY
Enables an administrator to enumerate and display the list of
installed device drivers as well as their properties.

DRIVERQUERY [/S system [/U username [/P [password]]]]
[/FO format] [/NH] [/SI] [/V]

Parameter List:
/S system Specifies the remote system to connect to.

/U [domain\]user Specifies the user context
under which the command should execute.

/P [password] Specify the Password for the given
user context. Prompts for input if omitted.

/FO format Specifies the type of output to display.
Valid values to be passed with the
switch are "TABLE", "LIST", "CSV".

/NH Specifies that the "Column Header"
should not be displayed in the
screen output. Valid for "TABLE"
and "CSV" format only.

/V Displays detailed information. Not valid
for signed drivers.

/SI Provides information about signed drivers.

/? Displays this Help/Usage.

Examples:
DRIVERQUERY
DRIVERQUERY /FO CSV /SI
DRIVERQUERY /NH
DRIVERQUERY /S ipaddress /U user /V
DRIVERQUERY /S system /U domain\user /P password /FO LIST

ECHO
Displays messages, or turns command-echoing on or off.

ECHO [ON | OFF]
ECHO [message]

Type ECHO without parameters to display the current echo setting.

EDIT
MS-DOS Editor

EDIT [/B] [/H] [/R] [/S] [/<nnn>] [/?] [file(s)]

/B - Forces monochrome mode.
/H - Displays the maximum number of lines possible for your hardware.
/R - Load file(s) in read-only mode.
/S - Forces the use of short filenames.
/<nnn> - Load binary file(s), wrapping lines to <nnn> characters wide.
/? - Displays this help screen.
[file] - Specifies initial files(s) to load. Wildcards and multiple
filespecs can be given.

EDLIN
Starts Edlin, a line-oriented text editor.

EDLIN [drive:][path]filename [/B]

/B Ignores end-of-file (CTRL+Z) characters.

ENDLOCAL
Ends localization of environment changes in a batch file.
Environment changes made after ENDLOCAL has been issued are
not local to the batch file; the previous settings are not
restored on termination of the batch file.

ENDLOCAL

If Command Extensions are enabled ENDLOCAL changes as follows:

If the corresponding SETLOCAL enable or disabled command extensions
using the new ENABLEEXTENSIONS or DISABLEEXTENSIONS options, then
after the ENDLOCAL, the enabled/disabled state of command extensions
will be restored to what it was prior to the matching SETLOCAL
command execution.

EXIT
Quits the CMD.EXE program (command interpreter) or the current batch
script.

EXIT [/B] [exitCode]

/B specifies to exit the current batch script instead of
CMD.EXE. If executed from outside a batch script, it
will quit CMD.EXE

exitCode specifies a numeric number. if /B is specified, sets
ERRORLEVEL that number. If quitting CMD.EXE, sets the process
exit code with that number.

FC
Compares two files or sets of files and displays the differences between
them


FC [/A] [/C] [/L] [/LBn] [/N] [/OFF[LINE]] [/T] [/U] [/W] [/nnnn]
[drive1:][path1]filename1 [drive2:][path2]filename2
FC /B [drive1:][path1]filename1 [drive2:][path2]filename2

/A Displays only first and last lines for each set of differences.
/B Performs a binary comparison.
/C Disregards the case of letters.
/L Compares files as ASCII text.
/LBn Sets the maximum consecutive mismatches to the specified
number of lines.
/N Displays the line numbers on an ASCII comparison.
/OFF[LINE] Do not skip files with offline attribute set.
/T Does not expand tabs to spaces.
/U Compare files as UNICODE text files.
/W Compresses white space (tabs and spaces) for comparison.
/nnnn Specifies the number of consecutive lines that must match
after a mismatch.
[drive1:][path1]filename1
Specifies the first file or set of files to compare.
[drive2:][path2]filename2
Specifies the second file or set of files to compare.


FIND
Searches for a text string in a file or files.

FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] "string" [[drive:][path]filename[ ...]]

/V Displays all lines NOT containing the specified string.
/C Displays only the count of lines containing the string.
/N Displays line numbers with the displayed lines.
/I Ignores the case of characters when searching for the string.
/OFF[LINE] Do not skip files with offline attribute set.
"string" Specifies the text string to find.
[drive:][path]filename
Specifies a file or files to search.

If a path is not specified, FIND searches the text typed at the prompt
or piped from another command.

FINDSTR
Searches for strings in files.

FINDSTR [/B] [/E] [/L] [/R] [/S] [/I] [/X] [/V] [/N] [/M] [/O] [/P] [/F:file]
[/C:string] [/G:file] [/D:dir list] [/A:color attributes] [/OFF[LINE]]
strings [[drive:][path]filename[ ...]]

/B Matches pattern if at the beginning of a line.
/E Matches pattern if at the end of a line.
/L Uses search strings literally.
/R Uses search strings as regular expressions.
/S Searches for matching files in the current directory and all
subdirectories.
/I Specifies that the search is not to be case-sensitive.
/X Prints lines that match exactly.
/V Prints only lines that do not contain a match.
/N Prints the line number before each line that matches.
/M Prints only the filename if a file contains a match.
/O Prints character offset before each matching line.
/P Skip files with non-printable characters.
/OFF[LINE] Do not skip files with offline attribute set.
/A:attr Specifies color attribute with two hex digits. See "color /?"
/F:file Reads file list from the specified file(/ stands for console).
/C:string Uses specified string as a literal search string.
/G:file Gets search strings from the specified file(/ stands for console).
/D:dir Search a semicolon delimited list of directories
strings Text to be searched for.
[drive:][path]filename
Specifies a file or files to search.

Use spaces to separate multiple search strings unless the argument is prefixed
with /C. For example, 'FINDSTR "hello there" x.y' searches for "hello" or
"there" in file x.y. 'FINDSTR /C:"hello there" x.y' searches for
"hello there" in file x.y.

Regular expression quick reference:
. Wildcard: any character
* Repeat: zero or more occurances of previous character or class
^ Line position: beginning of line
$ Line position: end of line
[class] Character class: any one character in set
[^class] Inverse class: any one character not in set
[x-y] Range: any characters within the specified range
\x Escape: literal use of metacharacter x
\<xyz Word position: beginning of word
xyz\> Word position: end of word

For full information on FINDSTR regular expressions refer to the online Command
Reference.

FOR
Runs a specified command for each file in a set of files.

FOR %variable IN (set) DO command [command-parameters]

%variable Specifies a single letter replaceable parameter.
(set) Specifies a set of one or more files. Wildcards may be used.
command Specifies the command to carry out for each file.
command-parameters
Specifies parameters or switches for the specified command.

To use the FOR command in a batch program, specify %%variable instead
of %variable. Variable names are case sensitive, so %i is different
from %I.

If Command Extensions are enabled, the following additional
forms of the FOR command are supported:

FOR /D %variable IN (set) DO command [command-parameters]

If set contains wildcards, then specifies to match against directory
names instead of file names.

FOR /R [[drive:]path] %variable IN (set) DO command [command-parameters]

Walks the directory tree rooted at [drive:]path, executing the FOR
statement in each directory of the tree. If no directory
specification is specified after /R then the current directory is
assumed. If set is just a single period (.) character then it
will just enumerate the directory tree.

FOR /L %variable IN (start,step,end) DO command [command-parameters]

The set is a sequence of numbers from start to end, by step amount.
So (1,1,5) would generate the sequence 1 2 3 4 5 and (5,-1,1) would
generate the sequence (5 4 3 2 1)

FOR /F ["options"] %variable IN (file-set) DO command [command-parameters]
FOR /F ["options"] %variable IN ("string") DO command [command-parameters]
FOR /F ["options"] %variable IN ('command') DO command [command-parameters]

or, if usebackq option present:

FOR /F ["options"] %variable IN (file-set) DO command [command-parameters]
FOR /F ["options"] %variable IN ('string') DO command [command-parameters]
FOR /F ["options"] %variable IN (`command`) DO command [command-parameters]

filenameset is one or more file names. Each file is opened, read
and processed before going on to the next file in filenameset.
Processing consists of reading in the file, breaking it up into
individual lines of text and then parsing each line into zero or
more tokens. The body of the for loop is then called with the
variable value(s) set to the found token string(s). By default, /F
passes the first blank separated token from each line of each file.
Blank lines are skipped. You can override the default parsing
behavior by specifying the optional "options" parameter. This
is a quoted string which contains one or more keywords to specify
different parsing options. The keywords are:

eol=c - specifies an end of line comment character
(just one)
skip=n - specifies the number of lines to skip at the
beginning of the file.
delims=xxx - specifies a delimiter set. This replaces the
default delimiter set of space and tab.
tokens=x,y,m-n - specifies which tokens from each line are to
be passed to the for body for each iteration.
This will cause additional variable names to
be allocated. The m-n form is a range,
specifying the mth through the nth tokens. If
the last character in the tokens= string is an
asterisk, then an additional variable is
allocated and receives the remaining text on
the line after the last token parsed.
usebackq - specifies that the new semantics are in force,
where a back quoted string is executed as a
command and a single quoted string is a
literal string command and allows the use of
double quotes to quote file names in
filenameset.

Some examples might help:

FOR /F "eol=; tokens=2,3* delims=, " %i in (myfile.txt) do @echo %i %j %k

would parse each line in myfile.txt, ignoring lines that begin with
a semicolon, passing the 2nd and 3rd token from each line to the for
body, with tokens delimited by commas and/or spaces. Notice the for
body statements reference %i to get the 2nd token, %j to get the
3rd token, and %k to get all remaining tokens after the 3rd. For
file names that contain spaces, you need to quote the filenames with
double quotes. In order to use double quotes in this manner, you also
need to use the usebackq option, otherwise the double quotes will be
interpreted as defining a literal string to parse.

%i is explicitly declared in the for statement and the %j and %k
are implicitly declared via the tokens= option. You can specify up
to 26 tokens via the tokens= line, provided it does not cause an
attempt to declare a variable higher than the letter 'z' or 'Z'.
Remember, FOR variables are single-letter, case sensitive, global,
and you can't have more than 52 total active at any one time.

You can also use the FOR /F parsing logic on an immediate string, by
making the filenameset between the parenthesis a quoted string,
using single quote characters. It will be treated as a single line
of input from a file and parsed.

Finally, you can use the FOR /F command to parse the output of a
command. You do this by making the filenameset between the
parenthesis a back quoted string. It will be treated as a command
line, which is passed to a child CMD.EXE and the output is captured
into memory and parsed as if it was a file. So the following
example:

FOR /F "usebackq delims==" %i IN (`set`) DO @echo %i

would enumerate the environment variable names in the current
environment.

In addition, substitution of FOR variable references has been enhanced.
You can now use the following optional syntax:

%~I - expands %I removing any surrounding quotes (")
%~fI - expands %I to a fully qualified path name
%~dI - expands %I to a drive letter only
%~pI - expands %I to a path only
%~nI - expands %I to a file name only
%~xI - expands %I to a file extension only
%~sI - expanded path contains short names only
%~aI - expands %I to file attributes of file
%~tI - expands %I to date/time of file
%~zI - expands %I to size of file
%~$PATH:I - searches the directories listed in the PATH
environment variable and expands %I to the
fully qualified name of the first one found.
If the environment variable name is not
defined or the file is not found by the
search, then this modifier expands to the
empty string

The modifiers can be combined to get compound results:

%~dpI - expands %I to a drive letter and path only
%~nxI - expands %I to a file name and extension only
%~fsI - expands %I to a full path name with short names only
%~dp$PATH:I - searches the directories listed in the PATH
environment variable for %I and expands to the
drive letter and path of the first one found.
%~ftzaI - expands %I to a DIR like output line

In the above examples %I and PATH can be replaced by other valid
values. The %~ syntax is terminated by a valid FOR variable name.
Picking upper case variable names like %I makes it more readable and
avoids confusion with the modifiers, which are not case sensitive.

FORMAT
Formats a disk for use with Windows XP.

FORMAT volume [/FS:file-system] [/V:label] [/Q] [/A:size] [/C] [/X]
FORMAT volume [/V:label] [/Q] [/F:size]
FORMAT volume [/V:label] [/Q] [/T:tracks /N:sectors]
FORMAT volume [/V:label] [/Q]
FORMAT volume [/Q]

volume Specifies the drive letter (followed by a colon),
mount point, or volume name.
/FS:filesystem Specifies the type of the file system (FAT, FAT32, or NTFS).
/V:label Specifies the volume label.
/Q Performs a quick format.
/C NTFS only: Files created on the new volume will be compressed
by default.
/X Forces the volume to dismount first if necessary. All opened
handles to the volume would no longer be valid.
/A:size Overrides the default allocation unit size. Default settings
are strongly recommended for general use.
NTFS supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K.
FAT supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K,
(128K, 256K for sector size > 512 bytes).
FAT32 supports 512, 1024, 2048, 4096, 8192, 16K, 32K, 64K,
(128K, 256K for sector size > 512 bytes).

Note that the FAT and FAT32 files systems impose the
following restrictions on the number of clusters on a volume:

FAT: Number of clusters <= 65526
FAT32: 65526 < Number of clusters < 4177918

Format will immediately stop processing if it decides that
the above requirements cannot be met using the specified
cluster size.

NTFS compression is not supported for allocation unit sizes
above 4096.

/F:size Specifies the size of the floppy disk to format (1.44)
/T:tracks Specifies the number of tracks per disk side.
/N:sectors Specifies the number of sectors per track.

FTP
Transfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.

FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [-A] [host]

-v Suppresses display of remote server responses.
-n Suppresses auto-login upon initial connection.
-i Turns off interactive prompting during multiple file
transfers.
-d Enables debugging.
-g Disables filename globbing (see GLOB command).
-s:filename Specifies a text file containing FTP commands; the
commands will automatically run after FTP starts.
-a Use any local interface when binding data connection.
-A login as anonymous.
-w:buffersize Overrides the default transfer buffer size of 4096.
host Specifies the host name or IP address of the remote
host to connect to.

Notes:
- mget and mput commands take y/n/q for yes/no/quit.
- Use Control-C to abort commands.

Also See: FTP Commands

FTYPE
Displays or modifies file types used in file extension associations

FTYPE [fileType[=[openCommandString]]]

fileType Specifies the file type to examine or change
openCommandString Specifies the open command to use when launching files
of this type.

Type FTYPE without parameters to display the current file types that
have open command strings defined. FTYPE is invoked with just a file
type, it displays the current open command string for that file type.
Specify nothing for the open command string and the FTYPE command will
delete the open command string for the file type. Within an open
command string %0 or %1 are substituted with the file name being
launched through the assocation. %* gets all the parameters and %2
gets the 1st parameter, %3 the second, etc. %~n gets all the remaining
parameters starting with the nth parameter, where n may be between 2 and 9,
inclusive. For example:





ASSOC .pl=PerlScript
FTYPE PerlScript=perl.exe %1 %*

would allow you to invoke a Perl script as follows:

script.pl 1 2 3

If you want to eliminate the need to type the extensions, then do the
following:

set PATHEXT=.pl;%PATHEXT%

and the script could be invoked as follows:

script 1 2 3

GOTO
Directs cmd.exe to a labeled line in a batch program.

GOTO label

label Specifies a text string used in the batch program as a label.

You type a label on a line by itself, beginning with a colon.

If Command Extensions are enabled GOTO changes as follows:

GOTO command now accepts a target label of :EOF which transfers control
to the end of the current batch script file. This is an easy way to
exit a batch script file without defining a label. Type CALL /? for a
description of extensions to the CALL command that make this feature
useful.

GRAFTABL
Enable Windows to display an extended character set in graphics mode.

GRAFTABL [xxx]
GRAFTABL /STATUS

xxx Specifies a code page number.
/STATUS Displays the current code page selected for use with GRAFTABL.

HELP
Provides help information for Windows XP commands.

HELP [command]

command - displays help information on that command.

IF
Performs conditional processing in batch programs.

IF [NOT] ERRORLEVEL number command
IF [NOT] string1==string2 command
IF [NOT] EXIST filename command

NOT Specifies that Windows XP should carry out
the command only if the condition is false.

ERRORLEVEL number Specifies a true condition if the last program run
returned an exit code equal to or greater than the number
specified.

string1==string2 Specifies a true condition if the specified text strings
match.

EXIST filename Specifies a true condition if the specified filename
exists.

command Specifies the command to carry out if the condition is
met. Command can be followed by ELSE command which
will execute the command after the ELSE keyword if the
specified condition is FALSE

The ELSE clause must occur on the same line as the command after the IF. For
example:

IF EXIST filename. (
del filename.
) ELSE (
echo filename. missing.
)

The following would NOT work because the del command needs to be terminated
by a newline:

IF EXIST filename. del filename. ELSE echo filename. missing

Nor would the following work, since the ELSE command must be on the same line
as the end of the IF command:

IF EXIST filename. del filename.
ELSE echo filename. missing

The following would work if you want it all on one line:

IF EXIST filename. (del filename.) ELSE echo filename. missing

If Command Extensions are enabled IF changes as follows:

IF [/I] string1 compare-op string2 command
IF CMDEXTVERSION number command
IF DEFINED variable command

where compare-op may be one of:

EQU - equal
NEQ - not equal
LSS - less than
LEQ - less than or equal
GTR - greater than
GEQ - greater than or equal

and the /I switch, if specified, says to do case insensitive string
compares. The /I switch can also be used on the string1==string2 form
of IF. These comparisons are generic, in that if both string1 and
string2 are both comprised of all numeric digits, then the strings are
converted to numbers and a numeric comparison is performed.

The CMDEXTVERSION conditional works just like ERRORLEVEL, except it is
comparing against an internal version number associated with the Command
Extensions. The first version is 1. It will be incremented by one when
significant enhancements are added to the Command Extensions.
CMDEXTVERSION conditional is never true when Command Extensions are
disabled.

The DEFINED conditional works just like EXISTS except it takes an
environment variable name and returns true if the environment variable
is defined.

%ERRORLEVEL% will expand into a string representation of
the current value of ERRORLEVEL, provided that there is not already
an environment variable with the name ERRORLEVEL, in which case you
will get its value instead. After running a program, the following
illustrates ERRORLEVEL use:





goto answer%ERRORLEVEL%
:answer0


echo Program had return code 0
:answer1


echo Program had return code 1

You can also using the numerical comparisons above:

IF %ERRORLEVEL% LEQ 1 goto okay

%CMDCMDLINE% will expand into the original command line passed to
CMD.EXE prior to any processing by CMD.EXE, provided that there is not
already an environment variable with the name CMDCMDLINE, in which case
you will get its value instead.

%CMDEXTVERSION% will expand into a string representation of the
current value of CMDEXTVERSION, provided that there is not already
an environment variable with the name CMDEXTVERSION, in which case you
will get its value instead.

IPCONFIG
IP Configuration

IPCONFIG [/? | /all | /renew [adapter] | /release [adapter] |
/flushdns | /displaydns | /registerdns |
/showclassid adapter |
/setclassid adapter [classid] ]

adapter Connection name
(wildcard characters * and ? allowed, see examples)

Options:
/? Display this help message
/all Display full configuration information.
/release Release the IP address for the specified adapter.
/renew Renew the IP address for the specified adapter.
/flushdns Purges the DNS Resolver cache.
/registerdns Refreshes all DHCP leases and re-registers DNS names
/displaydns Display the contents of the DNS Resolver Cache.
/showclassid Displays all the dhcp class IDs allowed for adapter.
/setclassid Modifies the dhcp class id.

The default is to display only the IP address, subnet mask and
default gateway for each adapter bound to TCP/IP.

For Release and Renew, if no adapter name is specified, then the IP address
leases for all adapters bound to TCP/IP will be released or renewed.


For Setclassid, if no ClassId is specified, then the ClassId is removed.


Examples:
> ipconfig ... Show information.
> ipconfig /all ... Show detailed information
> ipconfig /renew ... renew all adapters
> ipconfig /renew EL* ... renew any connection that has its
name starting with EL
> ipconfig /release *Con* ... release all matching connections,
eg. "Local Area Connection 1" or
"Local Area Connection 2"



KB16
Configures a keyboard for a specific language.

KB16 [xx[,[yyy][,[drive:][path]filename]]] [/E] [/ID:nnn]

xx Specifies a two-letter keyboard code.
yyy Specifies the code page for the character set.
[drive:][path]filename Specifies the keyboard definition file.
/E Specifies that an enhanced keyboard is installed.
/ID:nnn Specifies the keyboard in use.


LABEL
Creates, changes, or deletes the volume label of a disk.

LABEL [drive:][label]
LABEL [/MP] [volume] [label]

drive: Specifies the drive letter of a drive.
label Specifies the label of the volume.
/MP Specifies that the volume should be treated as a
mount point or volume name.
volume Specifies the drive letter (followed by a colon),
mount point, or volume name. If volume name is specified,
the /MP flag is unnecessary.

LOADFIX
Loads a program above the first 64K of memory, and runs the program.

LOADFIX [drive:][path]filename

Use LOADFIX to load a program if you have received the message
"Packed file corrupt" when trying to load it in low memory.


MD & MKDIR
Creates a directory.

MKDIR [drive:]path
MD [drive:]path

If Command Extensions are enabled MKDIR changes as follows:

MKDIR creates any intermediate directories in the path, if needed.
For example, assume \a does not exist then:

mkdir \a\b\c\d

is the same as:

mkdir \a


chdir \a
mkdir b


chdir b
mkdir c


chdir c
mkdir d

which is what you would have to type if extensions were disabled.

MODE
Configures system devices.

Serial port: MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s]
[to=on|off] [xon=on|off] [odsr=on|off]
[octs=on|off] [dtr=on|off|hs]
[rts=on|off|hs|tg] [idsr=on|off]

Device Status: MODE [device] [/STATUS]
Redirect printing: MODE LPTn[:]=COMm[:]
Select code page: MODE CON[:] CP SELECT=yyy
Code page status: MODE CON[:] CP [/STATUS]
Display mode: MODE CON[:] [COLS=c] [LINES=n]
Typematic rate: MODE CON[:] [RATE=r DELAY=d]

MEM
Displays the amount of used and free memory in your system.

MEM [/PROGRAM | /DEBUG | /CLASSIFY]

/PROGRAM or /P Displays status of programs currently loaded in memory.
/DEBUG or /D Displays status of programs, internal drivers, and other
information.
/CLASSIFY or /C Classifies programs by memory usage. Lists the size of
programs, provides a summary of memory in use, and lists
largest memory block available.

MORE
Displays output one screen at a time.

MORE [/E [/C] [/P] [/S] [/Tn] [+n]] < [drive:][path]filename
command-name | MORE [/E [/C] [/P] [/S] [/Tn] [+n]]
MORE /E [/C] [/P] [/S] [/Tn] [+n] [files]

[drive:][path]filename Specifies a file to display one
screen at a time.

command-name Specifies a command whose output
will be displayed.

/E Enable extended features
/C Clear screen before displaying page
/P Expand FormFeed characters
/S Squeeze multiple blank lines into a single line
/Tn Expand tabs to n spaces (default 8)

Switches can be present in the MORE environment
variable.

+n Start displaying the first file at line n

files List of files to be displayed. Files in the list
are separated by blanks.

If extended features are enabled, the following commands
are accepted at the -- More -- prompt:

P n Display next n lines
S n Skip next n lines
F Display next file
Q Quit
= Show line number
? Show help line
<space> Display next page
<ret> Display next line

MOVE
Moves files and renames files and directories.

To move one or more files:
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination

To rename a directory:
MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2

[drive:][path]filename1 Specifies the location and name of the file
or files you want to move.
destination Specifies the new location of the file. Destination
can consist of a drive letter and colon, a
directory name, or a combination. If you are moving
only one file, you can also include a filename if
you want to rename the file when you move it.
[drive:][path]dirname1 Specifies the directory you want to rename.
dirname2 Specifies the new name of the directory.

/Y Suppresses prompting to confirm you want to
overwrite an existing destination file.
/-Y Causes prompting to confirm you want to overwrite
an existing destination file.

The switch /Y may be present in the COPYCMD environment variable.
This may be overridden with /-Y on the command line. Default is
to prompt on overwrites unless MOVE command is being executed from
within a batch script.

PATH
Displays or sets a search path for executable files.

PATH [[drive:]path[;...][;%PATH%]
PATH ;

Type PATH ; to clear all search-path settings and direct cmd.exe to search
only in the current directory.
Type PATH without parameters to display the current path.
Including %PATH% in the new path setting causes the old path to be
appended to the new setting.

PAUSE
Suspends processing of a batch program and displays the message
Press any key to continue . . .
PAUSE

PING
PING [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] destination-list

Options:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.

-f Set Don't Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each reply.

POPD
Changes to the directory stored by the PUSHD command.

POPD

If Command Extensions are enabled the POPD command will delete
any temporary drive letter created by PUSHD when you POPD that
drive off the pushed directory stack.

PRINT
Prints a text file.

PRINT [/D:device] [[drive:][path]filename[...]]

/D:device Specifies a print device.


PROMPT
Changes the cmd.exe command prompt.

PROMPT [text]

text Specifies a new command prompt.

Prompt can be made up of normal characters and the following special codes:

$A & (Ampersand)
$B | (pipe)
$C ( (Left parenthesis)
$D Current date
$E Escape code (ASCII code 27)
$F ) (Right parenthesis)
$G > (greater-than sign)
$H Backspace (erases previous character)
$L < (less-than sign)
$N Current drive
$P Current drive and path
$Q = (equal sign)
$S (space)
$T Current time
$V Windows XP version number
$_ Carriage return and linefeed
$$ $ (dollar sign)

If Command Extensions are enabled the PROMPT command supports
the following additional formatting characters:

$+ zero or more plus sign (+) characters depending upon the
depth of the PUSHD directory stack, one character for each
level pushed.

$M Displays the remote name associated with the current drive
letter or the empty string if current drive is not a network
drive.

PUSHD
Stores the current directory for use by the POPD command, then
changes to the specified directory.

PUSHD [path | ..]

path Specifies the directory to make the current directory.

If Command Extensions are enabled the PUSHD command accepts
network paths in addition to the normal drive letter and path.
If a network path is specified, PUSHD will create a temporary
drive letter that points to that specified network resource and
then change the current drive and directory, using the newly
defined drive letter. Temporary drive letters are allocated from
Z: on down, using the first unused drive letter found.

RD & RMDIR
Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

/S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a directory
tree.

/Q Quiet mode, do not ask if ok to remove a directory tree with /S

RECOVER
Recovers readable information from a bad or defective disk.

RECOVER [drive:][path]filename
Consult the online Command Reference in Windows XP Help
before using the RECOVER command.

REM
Records comments (remarks) in a batch file or CONFIG.SYS.

REM [comment]

REN & RENAME
Renames a file or files.

RENAME [drive:][path]filename1 filename2.
REN [drive:][path]filename1 filename2.

Note that you cannot specify a new drive or path for your destination file.

REPLACE
Replaces files.

REPLACE [drive1:][path1]filename [drive2:][path2] [/A] [/P] [/R] [/W]
REPLACE [drive1:][path1]filename [drive2:][path2] [/P] [/R] [/S] [/W] [/U]

[drive1:][path1]filename Specifies the source file or files.
[drive2:][path2] Specifies the directory where files are to be
replaced.
/A Adds new files to destination directory. Cannot
use with /S or /U switches.
/P Prompts for confirmation before replacing a file or
adding a source file.
/R Replaces read-only files as well as unprotected
files.
/S Replaces files in all subdirectories of the
destination directory. Cannot use with the /A
switch.
/W Waits for you to insert a disk before beginning.
/U Replaces (updates) only files that are older than
source files. Cannot use with the /A switch.

SET
Displays, sets, or removes cmd.exe environment variables.

SET [variable=[string]]

variable Specifies the environment-variable name.
string Specifies a series of characters to assign to the variable.

Type SET without parameters to display the current environment variables.

If Command Extensions are enabled SET changes as follows:

SET command invoked with just a variable name, no equal sign or value
will display the value of all variables whose prefix matches the name
given to the SET command. For example:

SET P

would display all variables that begin with the letter 'P'

SET command will set the ERRORLEVEL to 1 if the variable name is not
found in the current environment.

SET command will not allow an equal sign to be part of the name of
a variable.

Two new switches have been added to the SET command:

SET /A expression
SET /P variable=[promptString]

The /A switch specifies that the string to the right of the equal sign
is a numerical expression that is evaluated. The expression evaluator
is pretty simple and supports the following operations, in decreasing
order of precedence:

() - grouping
! ~ - - unary operators
* / % - arithmetic operators
+ - - arithmetic operators
<< >> - logical shift
& - bitwise and
^ - bitwise exclusive or
| - bitwise or
= *= /= %= += -= - assignment
&= ^= |= <<= >>=
, - expression separator

If you use any of the logical or modulus operators, you will need to
enclose the expression string in quotes. Any non-numeric strings in the
expression are treated as environment variable names whose values are
converted to numbers before using them. If an environment variable name
is specified but is not defined in the current environment, then a value
of zero is used. This allows you to do arithmetic with environment
variable values without having to type all those % signs to get their
values. If SET /A is executed from the command line outside of a
command script, then it displays the final value of the expression. The
assignment operator requires an environment variable name to the left of
the assignment operator. Numeric values are decimal numbers, unless
prefixed by 0x for hexadecimal numbers, and 0 for octal numbers.
So 0x12 is the same as 18 is the same as 022. Please note that the octal
notation can be confusing: 08 and 09 are not valid numbers because 8 and
9 are not valid octal digits.

The /P switch allows you to set the value of a variable to a line of input
entered by the user. Displays the specified promptString before reading
the line of input. The promptString can be empty.

Environment variable substitution has been enhanced as follows:

%PATH:str1=str2%

would expand the PATH environment variable, substituting each occurrence
of "str1" in the expanded result with "str2". "str2" can be the empty
string to effectively delete all occurrences of "str1" from the expanded
output. "str1" can begin with an asterisk, in which case it will match
everything from the beginning of the expanded output to the first
occurrence of the remaining portion of str1.

May also specify substrings for an expansion.

%PATH:~10,5%

would expand the PATH environment variable, and then use only the 5
characters that begin at the 11th (offset 10) character of the expanded
result. If the length is not specified, then it defaults to the
remainder of the variable value. If either number (offset or length) is
negative, then the number used is the length of the environment variable
value added to the offset or length specified.

%PATH:~-10%

would extract the last 10 characters of the PATH variable.

%PATH:~0,-2%

would extract all but the last 2 characters of the PATH variable.

Finally, support for delayed environment variable expansion has been
added. This support is always disabled by default, but may be
enabled/disabled via the /V command line switch to CMD.EXE. See CMD /?

Delayed environment variable expansion is useful for getting around
the limitations of the current expansion which happens when a line
of text is read, not when it is executed. The following example
demonstrates the problem with immediate variable expansion:

set VAR=before


if "%VAR%" == "before" (
set VAR=after


if "%VAR%" == "after" @echo If you see this, it worked
)

would never display the message, since the %VAR% in BOTH IF statements
is substituted when the first IF statement is read, since it logically
includes the body of the IF, which is a compound statement. So the
IF inside the compound statement is really comparing "before" with
"after" which will never be equal. Similarly, the following example
will not work as expected:

set LIST=


for %i in (*) do set LIST=%LIST% %i


echo %LIST%

in that it will NOT build up a list of files in the current directory,
but instead will just set the LIST variable to the last file found.
Again, this is because the %LIST% is expanded just once when the
FOR statement is read, and at that time the LIST variable is empty.
So the actual FOR loop we are executing is:





for %i in (*) do set LIST= %i

which just keeps setting LIST to the last file found.

Delayed environment variable expansion allows you to use a different
character (the exclamation mark) to expand environment variables at
execution time. If delayed variable expansion is enabled, the above
examples could be written as follows to work as intended:

set VAR=before


if "%VAR%" == "before" (
set VAR=after


if "!VAR!" == "after" @echo If you see this, it worked
)

set LIST=


for %i in (*) do set LIST=!LIST! %i


echo %LIST%

If Command Extensions are enabled, then there are several dynamic
environment variables that can be expanded but which don't show up in
the list of variables displayed by SET. These variable values are
computed dynamically each time the value of the variable is expanded.
If the user explicitly defines a variable with one of these names, then
that definition will override the dynamic one described below:

%CD% - expands to the current directory string.

%DATE% - expands to current date using same format as DATE command.

%TIME% - expands to current time using same format as TIME command.

%RANDOM% - expands to a random decimal number between 0 and 32767.

%ERRORLEVEL% - expands to the current ERRORLEVEL value

%CMDEXTVERSION% - expands to the current Command Processor Extensions
version number.

%CMDCMDLINE% - expands to the original command line that invoked the
Command Processor.

SETLOCAL
Begins localization of environment changes in a batch file. Environment
changes made after SETLOCAL has been issued are local to the batch file.
ENDLOCAL must be issued to restore the previous settings. When the end
of a batch script is reached, an implied ENDLOCAL is executed for any
outstanding SETLOCAL commands issued by that batch script.

SETLOCAL

If Command Extensions are enabled SETLOCAL changes as follows:

SETLOCAL batch command now accepts optional arguments:
ENABLEEXTENSIONS / DISABLEEXTENSIONS
enable or disable command processor extensions. See
CMD /? for details.
ENABLEDELAYEDEXPANSION / DISABLEDELAYEDEXPANSION
enable or disable delayed environment variable
expansion. See SET /? for details.
These modifications last until the matching ENDLOCAL command,
regardless of their setting prior to the SETLOCAL command.

The SETLOCAL command will set the ERRORLEVEL value if given
an argument. It will be zero if one of the two valid arguments
is given and one otherwise. You can use this in batch scripts
to determine if the extensions are available, using the following
technique:

VERIFY OTHER 2>nul
SETLOCAL ENABLEEXTENSIONS


IF ERRORLEVEL 1 echo Unable to enable extensions

This works because on old versions of CMD.EXE, SETLOCAL does NOT
set the ERRORLEVEL value. The VERIFY command with a bad argument
initializes the ERRORLEVEL value to a non-zero value.

SHIFT
Changes the position of replaceable parameters in a batch file.

SHIFT [/n]

If Command Extensions are enabled the SHIFT command supports
the /n switch which tells the command to start shifting at the
nth argument, where n may be between zero and eight. For example:

SHIFT /2

would shift %3 to %2, %4 to %3, etc. and leave %0 and %1 unaffected.

SORT
SORT [/R] [/+n] [/M kilobytes] [/L locale] [/REC recordbytes]
[[drive1:][path1]filename1] [/T [drive2:][path2]]
[/O [drive3:][path3]filename3]

/+n Specifies the character number, n, to
begin each comparison. /+3 indicates that
each comparison should begin at the 3rd
character in each line. Lines with fewer
than n characters collate before other lines.
By default comparisons start at the first
character in each line.

/L[OCALE] locale Overrides the system default locale with
the specified one. The ""C"" locale yields
the fastest collating sequence and is
currently the only alternative. The sort
is always case insensitive.

/M[EMORY] kilobytes Specifies amount of main memory to use for
the sort, in kilobytes. The memory size is
always constrained to be a minimum of 160
kilobytes. If the memory size is specified
the exact amount will be used for the sort,
regardless of how much main memory is
available.

The best performance is usually achieved by
not specifying a memory size. By default the
sort will be done with one pass (no temporary
file) if it fits in the default maximum
memory size, otherwise the sort will be done
in two passes (with the partially sorted data
being stored in a temporary file) such that
the amounts of memory used for both the sort
and merge passes are equal. The default
maximum memory size is 90% of available main
memory if both the input and output are
files, and 45% of main memory otherwise.

/REC[ORD_MAXIMUM] characters Specifies the maximum number of characters
in a record (default 4096, maximum 65535).

/R[EVERSE] Reverses the sort order; that is,
sorts Z to A, then 9 to 0.

[drive1:][path1]filename1 Specifies the file to be sorted. If not
specified, the standard input is sorted.
Specifying the input file is faster than
redirecting the same file as standard input.

/T[EMPORARY]
[drive2:][path2] Specifies the path of the directory to hold
the sort's working storage, in case the data
does not fit in main memory. The default is
to use the system temporary directory.

/O[UTPUT]
[drive3:][path3]filename3 Specifies the file where the sorted input is
to be stored. If not specified, the data is
written to the standard output. Specifying
the output file is faster than redirecting
standard output to the same file.

START
Starts a separate window to run a specified program or command.

START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]
[parameters]

"title" Title to display in window title bar.
path Starting directory
B Start application without creating a new window. The
application has ^C handling ignored. Unless the application
enables ^C processing, ^Break is the only way to interrupt
the application
I The new environment will be the original environment passed
to the cmd.exe and not the current environment.
MIN Start window minimized
MAX Start window maximized
SEPARATE Start 16-bit Windows program in separate memory space
SHARED Start 16-bit Windows program in shared memory space
LOW Start application in the IDLE priority class
NORMAL Start application in the NORMAL priority class
HIGH Start application in the HIGH priority class
REALTIME Start application in the REALTIME priority class
ABOVENORMAL Start application in the ABOVENORMAL priority class
BELOWNORMAL Start application in the BELOWNORMAL priority class
WAIT Start application and wait for it to terminate
command/program
If it is an internal cmd command or a batch file then
the command processor is run with the /K switch to cmd.exe.
This means that the window will remain after the command
has been run.

If it is not an internal cmd command or batch file then
it is a program and will run as either a windowed application
or a console application.

parameters These are the parameters passed to the command/program


If Command Extensions are enabled, external command invocation
through the command line or the START command changes as follows:

non-executable files may be invoked through their file association just
by typing the name of the file as a command. (e.g. WORD.DOC would
launch the application associated with the .DOC file extension).
See the ASSOC and FTYPE commands for how to create these
associations from within a command script.

When executing an application that is a 32-bit GUI application, CMD.EXE
does not wait for the application to terminate before returning to
the command prompt. This new behavior does NOT occur if executing
within a command script.

When executing a command line whose first token is the string "CMD "
without an extension or path qualifier, then "CMD" is replaced with
the value of the COMSPEC variable. This prevents picking up CMD.EXE
from the current directory.

When executing a command line whose first token does NOT contain an
extension, then CMD.EXE uses the value of the PATHEXT
environment variable to determine which extensions to look for
and in what order. The default value for the PATHEXT variable
is:

.COM;.EXE;.BAT;.CMD

Notice the syntax is the same as the PATH variable, with
semicolons separating the different elements.

When searching for an executable, if there is no match on any extension,
then looks to see if the name matches a directory name. If it does, the
START command launches the Explorer on that path. If done from the
command line, it is the equivalent to doing a CD /D to that path.

SUBST
Associates a path with a drive letter.

SUBST [drive1: [drive2:]path]
SUBST drive1: /D

drive1: Specifies a virtual drive to which you want to assign a path.
[drive2:]path Specifies a physical drive and path you want to assign to
a virtual drive.
/D Deletes a substituted (virtual) drive.

Type SUBST with no parameters to display a list of current virtual drives.

TFTP
Transfers files to and from a remote computer running the TFTP service.

TFTP [-i] host [GET | PUT] source [destination]

-i Specifies binary image transfer mode (also called
octet). In binary image mode the file is moved
literally, byte by byte. Use this mode when
transferring binary files.
host Specifies the local or remote host.
GET Transfers the file destination on the remote host to
the file source on the local host.
PUT Transfers the file source on the local host to
the file destination on the remote host.
source Specifies the file to transfer.
destination Specifies where to transfer the file.

Also See: TFTP Commands

TIME
Displays or sets the system time.

TIME [/T | time]

Type TIME with no parameters to display the current time setting and a prompt
for a new one. Press ENTER to keep the same time.

If Command Extensions are enabled the TIME command supports
the /T switch which tells the command to just output the
current time, without prompting for a new time.

TITLE
Sets the window title for the command prompt window.

TITLE [string]

string Specifies the title for the command prompt window.

TREE
Graphically displays the folder structure of a drive or path.

TREE [drive:][path] [/F] [/A]

/F Display the names of the files in each folder.
/A Use ASCII instead of extended characters.


TYPE
Displays the contents of a text file or files.

TYPE [drive:][path]filename


TYPEPERF
Typeperf writes performance data to the command window or to a log file. To
stop Typeperf, press CTRL+C.

Usage:
typeperf { <counter [counter ...]> | -cf <filename> | -q [object]
| -qx [object] } [options]

Parameters:
<counter [counter ...]> Performance counters to monitor.

Options:
-? Displays context sensitive help.
-f <CSV|TSV|BIN|SQL> Output file format. Default is CSV.
-cf <filename> File containing performance counters to
monitor, one per line.
-si <[[hh:]mm:]ss> Time between samples. Default is 1 second.
-o <filename> Path of output file or SQL database. Default
is STDOUT.
-q [object] List installed counters (no instances). To
list counters for one object, include the
object name, such as Processor.
-qx [object] List installed counters with instances. To
list counters for one object, include the
object name, such as Processor.
-sc <samples> Number of samples to collect. Default is to
sample until CTRL+C.
-config <filename> Settings file containing command options.
-s <computer_name> Server to monitor if no server is specified
in the counter path.
-y Answer yes to all questions without
prompting.

Note:
Counter is the full name of a performance counter in
"\\<Computer>\<Object>(<Instance>)\<Counter>" format,
such as "\\Server1\Processor(0)\% User Time".

Examples:
typeperf "\Processor(_Total)\% Processor Time"
typeperf -cf counters.txt -si 5 -sc 50 -f TSV -o domain2.tsv
typeperf -qx PhysicalDisk -o counters.txt

TRACERPT
Tracerpt processes binary Event Trace Session log files or real-time streams
from instrumented Event Trace providers and creates a report or a text (CSV)
file describing the events generated.

Usage:
tracerpt { <filename [filename ...]> | -rt <session_name [session_name ...]>
} [options]

Parameters:
<filename [filename ...]> Event Trace log file to process.

Options:
-? Displays context sensitive help.
-o [filename] Text (CSV) output file. Default is
dumpfile.csv.
-summary [filename] Summary report text file (CSV) file. Default
is summary.txt.
-report [filename] Text output report file. Default is
workload.txt.
-rt <session_name [session_name ...]> Real-time Event Trace Session data
source.
-config <filename> Settings file containing command options.
-y Answer yes to all questions without
prompting.

Examples:
tracerpt logfile1.etl logfile2.etl -o -report
tracerpt logfile.etl -o logdmp.csv -summary logdmp.txt -report logrpt.txt
tracerpt -rt EVENT_SESSION_1 EVENT_SESSION_2 -o logfile.csv


VER
Displays the Windows XP version.

VER

VERIFY
Tells cmd.exe whether to verify that your files are written correctly to a
disk.

VERIFY [ON | OFF]

Type VERIFY without a parameter to display the current VERIFY setting.

VOL
Displays the disk volume label and serial number, if they exist.

VOL [drive:]

XCOPY
Copies files and directory trees.

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
[/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
[/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z]
[/EXCLUDE:file1[+file2][+file3]...]

source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies only files with the archive attribute set,
doesn't change the attribute.
/M Copies only files with the archive attribute set,
turns off the archive attribute.
/D:m-d-y Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
/EXCLUDE:file1[+file2][+file3]...
Specifies a list of files containing strings. Each string
should be in a separate line in the files. When any of the
strings match any part of the absolute path of the file to be
copied, that file will be excluded from being copied. For
example, specifying a string like \obj\ or .obj will exclude
all files underneath the directory obj or all files with the
.obj extension respectively.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones.
Same as /S /E. May be used to modify /T.
/V Verifies each new file.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file,
assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/G Allows the copying of encrypted files to destination that does
not support encryption.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not
include empty directories or subdirectories. /T /E includes
empty directories and subdirectories.
/U Copies only files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only attributes.
/N Copies using the generated short names.
/O Copies file ownership and ACL information.
/X Copies file audit settings (implies /O).
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.
/Z Copies networked files in restartable mode.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.

 

 

 

 

mwl






 

 

 

 

Au besoin Cliques ici pour m'envoyer un courriel.

Dernière modification : 10 janvier 2017.