just one line code
---------
showmessage dir$("@")
copy the compiled showcd.exe to c:\windows\
run in cmd line:
>d:
d:\>showcd
message box result: d:\
but when run showcd with param, e.g.
d:\>showcd hello
result is c:\windows
problem is how to get exact current dir when running with cmd param?
thanks
get current directory problem
Re: get current directory problem
You are right, if you use a command$ string values then the behaviour of the DIR$() changes.
I tried a few things, but no result.
I tried a few things, but no result.
Re: get current directory problem
I think the problem is you 'r running a program from another directory, in cmd first set the current directory to d with the dos command
cd d:\
you probleby run d:\showcd hello from the current dir c:\windows.
cd d:\
you probleby run d:\showcd hello from the current dir c:\windows.
Re: get current directory problem
Hi Marco,
I tried it too (I just joined this forum so hello to everyone) and I think you're right.
Cheers
I tried it too (I just joined this forum so hello to everyone) and I think you're right.
Cheers