Re: Duplicated files program
Ricardo <rforno at tutopia.com> wrote:
<snip>
> Each drive under DOS/Windows has at any time its current dir.
This applies to DOS. Are you sure, that it applies to Windows, too?
After reading
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/dirref_6g6x.asp
I _assume_, on Windows there is only one current directory.
> If I issue:
> i = chdir("D:\\GAMES"), I am changing the current dir of D: (a thing I don't
> want to do) and, moreover, current_dir() still returns the current dir of
> C:, for example C:\ZZ.
> If, instead, I write:
> i = chdir("D:"), nothing happens.
> What I want to know is the current dir of a drive different from the one I
> am executing my program. This works with system() under ex, but not under
> exw.
system() starts a new DOS shell. For example, using system("D:", 2) sets
the current drive to D: _on DOS_.
When you call system("D:", 2) from a Windows program, I _assume_ that
Windows simply doesn't know what has happened on DOS.
> Please have a look to my NEWDUP.EXW program that I sent earlier.
> Regards.
<snip>
Another consideration concerning current_dir():
What happens, when another program changes the current directory, while
your program is running?
Regards,
Juergen
|
Not Categorized, Please Help
|
|