I am having a problem in executing Unix commands from C. For example,
If I want to execute a 'ls -l' command from C, I type
But, for a 'mv ' command, I cannot put the filenames in the
'system' command, as I will be giving them during run time.
That is 'system("mv filename1 filename2") should execute with
filename1 and filename2 as variable strings, the values of which
will be given at runtime.
Also, after 'moving' how do I delete filename1 ?
Could someone help me on this problem ?
Please mail your replies to
Thanks for your time