RE: changing directory in .exw...

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 19 May 2003, at 23:38, wooseoblee at empal.com wrote:

> 
> 
> Greg Haberek wrote:
> > 
> > 
> > > in win32 euphoria(.exw), the "system" command for changing directory 
> > > like;
> > system("cd
> > > c:\\windows",2) does'nt work?
> > > The above system() command fail to change dir. in my win98.
> > >
> > > i know we have no reason to use "system" because chdir command is
> > available. This
> > > question is Just to make it clear for myself.
> > 
> > it is my understanding that system() (under exw) starts a new instance 
> > of
> > the command-line, just like running 'command' (or 'cmd' in 2k or XP) at 
> > the
> > command prompt. so in all reality, the directory *does* change, but 
> > reverts
> > back once system() returns, since that new instance of 'command' closes. i
> > suggest using the API functions to switch directories in Windows, and i
> > believe Aku just posted some file operations to the Archive.
> > 
> > ~Greg
> > g.haberek at comcast.net
> > 
> > 
> Thank you for your answer.
> but i've read somewhere else that the current directory is the global 
> property, independent on each instance of command shell. isn't it?

In some cases, a CD in one dos shell will stick, and be the default dir if you 
close the first and open a 2nd dos shell, at least in win95b. This happens all 
the time in IE's "save as" menu, which shows a different dir for html vs jpg 
saves. Basically, don't trust where the OS will put the file, cd to it every
time.

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu