Converting the FileSystemObject's GetAbsolutePathName Method

Definition: Returns a complete path given a path specification.

GetAbsolutePathName

The Convert-Path cmdlet functions similarly to the GetAbsolutePathName method.

This command returns the full path to the home directory. For example, on Windows Vista the following would return the complete path to the user directory, such as C:\Users\kenmyer:

Convert-Path ~

This command returns the full path to the current directory:

PS C:\scripts> Convert-Path .
C:\scripts

This command returns the full path to the parent of the current directory:

PS C:\scripts\temp> Convert-Path ..
C:\scripts

See conversions of other FileSystemObject methods and properties.
Return to the VBScript to Windows PowerShell home page