Retrieve parent directory for a file or folder.
OutputVar := DirGetParent(Path , ParentCount)Function Example: ParentDir := DirGetParent(A_AhkPath)
The name of the variable in which to store the parent directory.
Path to a directory or File, the path must exist.
By default (ParentCount = 1) parent directory is retrieved, to retrieve parent of parent use 2 and so on.
If there is no parent directory, empty string will be returned.
MsgBox % DirGetParent(A_AhkPath)