Re: Changing directories from a C console program
From: Alan Balmer (albalmer_at_att.net)
Date: 08/27/04
- Next message: Alan Balmer: "Re: Two Questions about "strlen", "strcat" and "strcpy""
- Previous message: Eric Sosman: "Re: Determining EOF using fseek()?"
- In reply to: oddstray: "Changing directories from a C console program"
- Next in thread: Kenneth Brody: "Re: Changing directories from a C console program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 27 Aug 2004 08:34:55 -0700
On 26 Aug 2004 17:57:50 -0700, oddstray@gmail.com (oddstray) wrote:
>
>I'm using WinXP. I wrote a short C utility in which I want to change
>directories and run programs. When I use the system() method and pass
>in the same command that works in a cmd.exe session, it claims "Unable
>to locate the directory". This happens for directories with and
>without spaces in their names. Can anyone tell me what's wrong?
>Thanks.
Off topic here. Try a Windows programming group. However, I note that
you have one method which works - why not use it?
{OT} I wouldn't expect the system calls to work. You spawn a shell,
change directory in that shell, then close the shell and return to the
program you spawned it from. {/OT]
-- Al Balmer Balmer Consulting removebalmerconsultingthis@att.net
- Next message: Alan Balmer: "Re: Two Questions about "strlen", "strcat" and "strcpy""
- Previous message: Eric Sosman: "Re: Determining EOF using fseek()?"
- In reply to: oddstray: "Changing directories from a C console program"
- Next in thread: Kenneth Brody: "Re: Changing directories from a C console program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|