Hi all,
I have a script to going down a directory, find all files within the sub-directory and then tar them using:
exec("tar -c -f $dir_name$date_string.$tar -C '/some_directory/storage/'$dhf[$i] $filestring");
It works perfectly. I then move tha tar files to somewhere else. Now I need to remove the original files.
QUestion:
(1) Would the above exec() function return anything at all to indicate if the operation is sucessful? Don;t want to remove the original if exec() fails!
(2) If there is no such thing as number (1), will there be a better way to do this. All I want to do is to tar some files, move them away to other directory then remove the original.
Thank you.