Show Current Working Folder or Directory Full Path in Batch Command Script Aktuelle Arbeiten zeigen, Ordner oder Verzeichnis vollständigen Pfad in Batch Command Script
When executing a batch command script (in .cmd or .bat file extension), sometimes it's useful to get to know the current working directory of the batch script. Beim Ausführen einer Batch-Skript-Befehl (in. Cmd oder. Bat-Datei-Erweiterung), manchmal ist es nützlich, um zu wissen, das aktuelle Verzeichnis der Batch-Skript. Knowing the current directory or working folder in batch command is useful to ensure that the script is calling command or program at correct path, or manipulation of file and folder is done at valid destination when using relative path. Wissen, das aktuelle Verzeichnis oder Arbeitsordner im Batch-Befehl ist nützlich, um sicherzustellen, dass das Skript ruft Befehl oder das Programm korrekt auf den Pfad oder die Manipulation von Dateien und Ordnern erfolgt auf gültiges Ziel bei der Verwendung von relativen Pfad. Another important usage is to capture and save the current directory for later use, and the script may change the path during its course. Eine weitere wichtige Anwendung ist zum Erfassen und speichern Sie das aktuelle Verzeichnis für die spätere Verwendung, und das Skript kann den Weg in ihren Lauf.
In fact, the showing and displaying of current directory is easy with the use of pseudo-variable for cmd.exe environment variables. In der Tat, die zeigen, und die Anzeige des aktuellen Verzeichnisses ist einfach mit der Verwendung von Pseudo-Variable für cmd.exe Umgebungsvariablen. From Windows 2000 onwards, Microsoft Windows has added %CD% pseudo-variable that expands to the current working directory. Von Windows 2000, Microsoft Windows hat die CD%% Pseudo-Variable, die erweitert das aktuelle Verzeichnis.
For example, to display current working directory, just use the following command: Zum Beispiel, um die aktuellen Verzeichnis, benutzen Sie einfach den folgenden Befehl ein:
Echo %CD% Echo% CD%
To save and store the current directory where a file is located for later use after change directory (cd) to other folder to perform other operations, use the following commands: Zum Speichern und speichern Sie das aktuelle Verzeichnis, in dem eine Datei befindet sich zur späteren Verwendung nach dem Verzeichnis wechseln (cd) in andere Ordner auf andere Vorgänge, verwenden Sie die folgenden Befehle:
Set CURRENTDIR=%CD%
The %CURRENTDIR% variable to store the current working directory, which can be used in later batch commands, which as changing back to this previous directory. Die CURRENTDIR%% Variable zum Speichern der aktuellen Verzeichnis, die benutzt werden können in späteren Batch-Befehle, die die Änderung wieder zurück zu diesem Verzeichnis.
In Windows 9x, the %CD% pseudo-variable is not existed. In Windows 9x, die CD%% Pseudo-Variable ist nicht gegeben. To get the current directory, use the following trick: Um das aktuelle Verzeichnis, verwenden Sie den folgenden Trick:
CD | Time | Find ":\" > Temp1.Bat
Echo Set CD=%%4 %%5 %%6 %%7 %%8 %%9 > Enter.Bat
Call Temp1.Bat
Del Temp1.Bat
Del Enter.Bat
The end result is a variable %CD% been returned to the batch processing session which contains the current working directory. Das Ergebnis ist eine Variable% CD% wurden an die Batch-Verarbeitung Tagung, die das aktuelle Verzeichnis.
IMPORTANT : The page is machine translated and provided "as is" without warranty. WICHTIG: Die Seite ist Maschine übersetzt und "as is" ohne Garantie. Machine translation may be difficult to understand. Maschinelle Übersetzung kann schwierig zu verstehen. Please refer to Bitte beachten Sie original English article Original Englisch Artikel whenever possible. wann immer dies möglich ist.
Related Articles In Verbindung stehende Artikel
- Open Elevated Command Prompt Window Here as Administrator at Current Folder Directly in Vista Windows Explorer Open Elevated Command Prompt Fenster Hier als Administrator auf Aktueller Ordner direkt in Vista Windows Explorer
- Windows Vista and Server 2008 Services Optimization (with Batch Command Script Optimizer) Windows Vista und Server 2008 Service Optimization (mit Batch-Befehl Script Optimizer)
- Script to Backup Current Start State (Startup Type) of Windows Services Skript für Backup-Start Aktueller Stand (Start Art) der Windows-Dienste
- Reveal and Access to Windows Vista Hidden Context-Sensitive (Right Click) Menu Item - Open Command Prompt Here & Copy as Path Reveal und den Zugang zu Windows Vista Hidden Context-Sensitive (Right Click) Menu Item - Open Command Prompt Here & Kopieren als Pfad
- Reveal, Copy and Get File Full Path with Copy as Path in Windows Vista Reveal, Copy and Get File Full Path mit Kopieren als Pfad in Windows Vista
- TimerLock Automated Batch Install Script for TimerStop Driver v2a and Windows Vista Activation 2099 Crack TimerLock Automated Batch Install Script für TimerStop Treiber V2A und Aktivierung von Windows Vista 2099 Crack
- How To Mount and Access New Partition, Volume or Drive As Folder Path In Windows Wie auf den Berg und Zugang zu neuen Partition, Band oder Laufwerk als Ordner im Windows-Pfad
- Add Open Command Window Here to XP Folder with PowerToy Add Open Command Window Here to XP Ordner mit PowerToy
- Vista IE7 Cache & Cookies Folder, Temp Directory and History Location Vista IE7 Cache & Cookies Ordner, Temp-Verzeichnis und Geschichte Lage
- Change My Documents Folder Default Location Path in XP and Vista Ändern Sie Ordner "Eigene Dateien" Standardspeicherort Pfad in XP und Vista









































