windir

display names and paths of Windows directories 

Command


SYNOPSIS

windir [-f] [-l| -s| -t]

windir spec_folder


DESCRIPTION

The windir command uses standard Windows system calls to display directory names to standard output.

When the second form of the command is specified, windir displays the path name for the non-virtual special folder specified by spec_folder. For a list of special folders and what they contain, see the filebox reference page.

If no options or folder are specified, windir returns the name of the Windows directory.

Options

-f 

displays full path names rather than the short DOS path names that are displayed by default.

-l 

displays the names of all non-virtual special folders found on the system.

-s 

displays the name of the Windows system directory, per the Windows GetSystemDirectory() function.

-t 

displays the Windows temporary directory path, per the Windows GetTempPath() function.

The -s and -t options are mutually exclusive.

EXAMPLES

windir; windir -t; windir -s

might produce output like:

C:/Windows
c:/TMP/
C:/Windows/System32

DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

>0 

An error occurred.


PORTABILITY

Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
filebox


PTC MKS Toolkit 10.4 Documentation Build 39.