$PATH is not the current directory; it's the search path for executables. At any rate, simply changing an environment variable won't change your directory, at least not on any platform I'm aware of....
Type: Posts; User: cas
$PATH is not the current directory; it's the search path for executables. At any rate, simply changing an environment variable won't change your directory, at least not on any platform I'm aware of....
Not directly. You can use snprintf() to build up the string, though:
char cmd[1024];
snprintf(cmd, sizeof cmd, "find / -name %s", args[1]);
system(cmd);
If you don't have snprintf() (it's...