|
|
|
@ -5,6 +5,7 @@ DOCUMENTATION:
|
|
|
|
short_description: Get a Windows path's directory
|
|
|
|
short_description: Get a Windows path's directory
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Returns the directory component of a Windows path, what is left in the string that is not 'win_basename'.
|
|
|
|
- Returns the directory component of a Windows path, what is left in the string that is not 'win_basename'.
|
|
|
|
|
|
|
|
- While specifying an UNC (Universal Naming Convention) path, please make sure the path conforms to the UNC path syntax.
|
|
|
|
options:
|
|
|
|
options:
|
|
|
|
_input:
|
|
|
|
_input:
|
|
|
|
description: A Windows path.
|
|
|
|
description: A Windows path.
|
|
|
|
@ -18,6 +19,10 @@ EXAMPLES: |
|
|
|
|
# To get the last name of a file Windows path, like 'C:\users\asdf' out of 'C:\Users\asdf\foo.txt'
|
|
|
|
# To get the last name of a file Windows path, like 'C:\users\asdf' out of 'C:\Users\asdf\foo.txt'
|
|
|
|
{{ mypath | win_dirname }}
|
|
|
|
{{ mypath | win_dirname }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Get dirname from the UNC path in the form of '\\<SERVER_NAME>\<SHARE_NAME>\<FILENAME.FILE_EXTENSION>'
|
|
|
|
|
|
|
|
# like '\\server1\test\foo.txt' returns '\\\\server1\\test\\'
|
|
|
|
|
|
|
|
filename: "{{ mypath | win_dirname }}"
|
|
|
|
|
|
|
|
|
|
|
|
RETURN:
|
|
|
|
RETURN:
|
|
|
|
_value:
|
|
|
|
_value:
|
|
|
|
description: The directory from the Windows path provided.
|
|
|
|
description: The directory from the Windows path provided.
|
|
|
|
|