My Tech Notes
Unix dirname equivalent in Windows scripting
On Linux/Unix system:
echo `dirname $0`
On Windows system:
echo %~dp0
Other Equivalents:
Unix Bash
Windows/DOS
$@
%*
all the arguments
$1, $2,$3, …
%1,%2,%3, …
argument
References:
MS-DOS CALL command help
DOS/Command Batch Scripting Quick Reference
Converting DOS Batch Files to Shell Scripts
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment