beautypg.com

Ncast presentation recorder reference manual – NCast PR720 User Manual

Page 87

background image

NCast Presentation Recorder Reference Manual

exit 1

endif

# Get list of current archive files

if (-e PR720-filelist) then
rm -f PR720-filelist
endif

wget $verbosity --output-document=PR720-filelist --http-user=backup --http-passwd=$passwd http://
$PR720ip/backup/list.cgi

if ($status != 0) then
echo "PR720files: Error in accessing archive"
exit 1
endif

if (! -e PR720-filelist) then
echo "PR720files: Failed to retrieve archive file list"
exit 1
endif

if (-z PR720-filelist) then
echo "PR720files: No archive files in list"
exit 1
endif

# Process all files in the list that was downloaded

foreach mp4 (`cat PR720-filelist`)

# Get the media file

echo "PR720files: Retrieving media file $mp4"
wget $verbosity --timestamping --http-user=backup --http-passwd=$passwd http://
$PR720ip/backup/download/$mp4

if ($status != 0) then
echo "PR720files: Error in accessing media file $mp4"
exit 1
endif

# Get the associated xml description file

set xml = $mp4:r.xml

echo "PR720files: Retrieving xml file $xml"
wget $verbosity --timestamping --http-user=backup --http-passwd=$passwd http://
$PR720ip/backup/download/$xml

if ($status != 0) then
echo "PR720files: Error in accessing xml file $xml"
exit 1
endif

# Delete the file if it was downloaded and if the delete option was set (argument 3 == "delete")

if ($deleteoption == "delete" && -e $mp4 && -s $mp4) then
echo "PR720files: Deleting archive file $mp4"
wget $verbosity --http-user=backup --http-passwd=$passwd --output-document=$mp4:r.msg http://
$PR720ip/backup/remove.cgi\?file=$mp4

if ($status != 0) then
echo "PR720files: Error in deleting media file $mp4"
exit 1
endif

echo "PR720files: returned result is: `cat $mp4:r.msg`"
rm -f $mp4:r.msg

NCast Corporation

Revision 1.1

Page 87

This manual is related to the following products: