Comment passer de ‘windowssystem32’ à ‘users’ dans l’invite de commande


Vous pouvez utiliser un chemin absolu ou un chemin relatif. J'expliquerai les deux, et j'expliquerai également comment y arriver si votre répertoire de travail actuel se trouve sur un lecteur distinct. Dans les exemples, je vais inclure le "prompt" pour le contexte. Les commandes réelles viennent après le ">" (signe plus grand que). J'utiliserai "_" (trait de soulignement) pour indiquer le curseur à l'invite après que vous ayez fini d'exécuter les commandes.

If you begin the path with a backslash, it is considered an “absolute” path (relative to the top level, which is called the “root directory”), so the following command will do what you want:

  1. C:WindowsSytem32> cd Users 
  2. C:Users> _ 

If you omit the backslash, it is considered a relative path, so the following will try to go to C:WindowsSytem32Users:

  1. C:WindowsSytem32> cd Users 
  2. The system cannot find the path specified. 
  3. C:WindowsSytem32> _ 

You can also traverse upward in the directory structure with a relative path by using .. (which means “parent directory”). In this case, you are two directories deep, so you will need to go up two directories before descending into the Users directory. You could do that with the following command:

  1. C:WindowsSystem32> cd ....Users 
  2. C:Users> _ 

If your current working directory is on another drive (drive D, for example), you will also need to change to the target drive by typing the drive letter followed by a colon. For example:

  1. D:Documents> c: 
  2. C:WindowsSystem32> cd Users 
  3. C:Users> _