#open the record def openmoviedata require 'fileutils' $currentmovietext = "%s" % [@a_moviefilename] photoname = $currentmovietext + ".jpg" begin # exception trapped block path_to = File.join( "rwd_files", "moviestmp.jpg" ) path_from = File.join( $rwdmovies_directory, photoname ) if ! File.exist?(path_from) path_from = File.join($rwdmovies_directory,"nophoto.jpg" ) end if File.exist?(path_from) FileUtils.cp(path_from, path_to) end fileName = $rwdmovies_directory + "/" + $currentmovietext + ".nam" fd = File.open(fileName,"r") @moviedatadisplay = " " while ! fd.eof? @moviedatadisplay = fd.read end fd.close rescue SystemCallError, StandardError $stderr.print "system call error: " + $! end # exception rescue end