Windows equivalente a UNIX pwd


¿Cómo encuentro la ruta local en Windows en un símbolo del sistema?

Author: Yu Hao, 2009-05-28

9 answers

Esto lo imprime en la consola

echo %cd%

O pegue este comando en CMD, entonces tendrá pwd:

(echo @echo off
echo echo ^%cd^%) > C:\WINDOWS\pwd.bat
 359
Author: Petar Kabashki,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-06-24 13:31:33

Es cd para "directorio actual".

 105
Author: Daniel A. White,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-05-28 16:12:19

Abra el bloc de notas como administrador y escriba:

@echo %cd%

Guárdelo en c:\windows\system32\ con el nombre "pwd.cmd " (tenga cuidado de no guardar pwd.cmd.txt)

Entonces tienes el comando pwd.

 20
Author: Fernando,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-02-02 17:26:09

cd ,

Dará el directorio actual

D:\Folder\subFolder>cd ,
D:\Folder\subFolder
 14
Author: user4350567,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-12-11 16:18:15

cd sin ningún parámetro es equivalente a pwd en Unix/Linux.

Desde la salida de la consola de escribir cd /?:

Displays the name of or changes the current directory.

[...]

Type CD without parameters to display the current drive and directory.
 11
Author: Roy Tinker,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-04-26 23:47:49

Hmm - pwd funciona para mí en Vista...

Final EDIT: funciona para mí en Vista porque WinAVR instaló pwd.exe y añadido \Archivos de programa \ WinAVR \ Utils \ bin a mi ruta.

 1
Author: sean e,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-05-28 20:19:51

Dir / find"Directory"

 0
Author: ,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-05-28 17:53:59

C:\Documents y Ajustes\Scripter > echo % cd% C:\Documents y Preferencias \ Scripter

C:\Documents y Preferencias \ Scripter >

Para unix use el comando pwd

Directorio de trabajo Actual

 0
Author: ,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-08-31 13:40:59

Se puede poner simplemente "."el signo del punto. He tenido una aplicación cmd que requería la ruta y ya estaba en el directorio necesario y utilicé el símbolo de punto.

Espero que ayude.

 -3
Author: Mastereve,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-03-11 23:48:21