My current directory is “C:\devel\test\”
I would like to run something like command -m 'pwd'\data\test.xml and it act as though I entered command -m C:\devel\test\data\test.xml
If I were writing a script I would:
$pwd = pwd
command -m $pwd\data\test.xml
But not sure how to do this at the prompt.
update
This may be an IronPython issue. Using the command azhrei suggested below ipy -m ($pwd.path + "\data\test.xml") I get the following error:
Unhandled exception:
Traceback (most recent call last):
File "C:\Program Files (x86)\IronPython 2.7\Lib\runpy.py", line 101, in _get_module_details
File "C:\Program Files (x86)\IronPython 2.7\Lib\runpy.py", line 170, in run_module
File "C:\Program Files (x86)\IronPython 2.7\Lib\pkgutil.py", line 456, in get_loader
File "C:\Program Files (x86)\IronPython 2.7\Lib\pkgutil.py", line 466, in find_loader
File "C:\Program Files (x86)\IronPython 2.7\Lib\pkgutil.py", line 422, in iter_importers
ImportError: Import by filename is not supported.
When I run ipy -m C:\devel\test\data\test.xml it works just fine.
Use %CD% at the command prompt, so:
command -m %CD%\data\test.xmlOr if you mean you’re having problems at the powershell prompt:
command -m ($pwd.path + "\data\test.xml")