List Info

Thread: relative path in windows XP




relative path in windows XP
country flaguser name
United States
2008-03-27 08:28:10

Hi,

I have a script:

#!perl -w

system("....somefun.exe <input.txt");

However, I got the warning message:

'..' is not recognized as an internal or external
command, operable program or batch file.

Does anyone know what i should do to fix this relative
path problem?

__________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

__._,_.___
.

__,_._,___
Re: relative path in windows XP
country flaguser name
United States
2008-03-27 08:36:06

2008/3/27 jiqiang yao < jiqiang123%40yahoo.com">jiqiang123yahoo.com>:
&gt; I have a script:
>
> #!perl -w
> system(&quot;....somefun.exe <input.txt");
>
> However, I got the warning message:
>
>; '..' is not recognized as an internal or external
> command, operable program or batch file.
&gt;
> Does anyone know what i should do to fix this relative
> path problem?

The problem is that you're using backslashes in a double-quoted string.
Backslashes are escaping characters, so ".&quot; is really the same as ".&quot;. The
nice thing is, you don't NEED to use backslashes, even though you're on
Windows. You can simply use forwardslashes, and the OS will know what to
do:

system "../../somefun.exe < input.txt&quot;;

--
[Mary said,] "Do whatever he tells you." ~ John 2:5
The Cross Reference - http://thecrossreference.blogspot.com/
Nos autem praedicamus Christum crucifixum (1 Cor 1:23)

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )