Hi , <br><br> I am giving documents to differentiate between. System and Spawn functions. As I've already given info about execl. <br>Please have a look over it. The answer is long because you have asked very general question. <br><br>Thanx<br>Siddhartha Singh<br><A HREF="mailto:ssingh@aztecsoft.com">ssingh@aztecsoft.com</A><br><br>--------------- System () ------------------------------<br>The system function passes command to the command interpreter, which executes the string as an operating-system command. system refers to the COMSPEC and PATH environment variables that locate the command-interpreter file (the file named CMD.EXE in Windows NT). If command is NULL, the function simply checks to see whether the command interpreter exists.<br><br>You must explicitly flush (using fflush or _flushall) or close any stream before calling system.Return Value<br><br>If command is NULL and the command interpreter is found, the function returns a nonzero value. If the command interpreter is not found, it returns 0 and sets errno to ENOENT. If command is not NULL, system returns the value that is returned by the command interpreter. It returns the value 0 only if the command interpreter returns the value 0. A return value of – 1 indicates an error, and errno is set to one of the following values:<br><br>E2BIG<br><br>Argument list (which is system-dependent) is too big.<br><br>ENOENT<br><br>Command interpreter cannot be found.<br><br>ENOEXEC<br><br>Command-interpreter file has invalid format and is not executable.<br><br>ENOMEM<br><br>Not enough memory is available to execute command; or available memory has been corrupted; or invalid block exists, indicating that process making call was not allocated properly.<br><br><br><br>------------------SPAWN () FUNCTION--------------------<br><br><br>Enough memory must be available for loading and executing the new process. The mode argument determines the action taken by the calling process before and during _spawn. The following values for mode are defined in PROCESS.H:<br><br>_P_OVERLAY<br><br>Overlays calling process with new process, destroying the calling process (same effect as _exec calls).<br><br>_P_WAIT<br><br>Suspends calling thread until execution of new process is complete (synchronous _spawn).<br><br>_P_NOWAIT or _P_NOWAITO<br><br>Continues to execute calling process concurrently with new process (asynchronous _spawn). <br><br>_P_DETACH<br><br>Continues to execute the calling process; new process is run in the background with no access to the console or keyboard. Calls to _cwait against the new process will fail (asynchronous _spawn).<br><br>The cmdname argument specifies the file that is executed as the new process and can specify a full path (from the root), a partial path (from the current working directory), or just a filename. If cmdname does not have a filename extension or does not end with a period (.), the _spawn function first tries the .COM extension, then the .EXE extension, the .BAT extension, and finally the .CMD extension.<br><br>If cmdname has an extension, only that extension is used. If cmdname ends with a period, the _spawn call searches for cmdname with no extension. The _spawnlp, _spawnlpe, _spawnvp, and _spawnvpe functions search for cmdname (using the same procedures) in the directories specified by the PATH environment variable.<br><br>If cmdname contains a drive specifier or any slashes (that is, if it is a relative path), the _spawn call searches only for the specified file; no path searching is done.<br><br><br><br>