Click here to Skip to main content
15,887,464 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
script
application.backupExistingFile = function (streamName)
{
	
	var srcpath = "C:/flvs/vods/test.flv" ;
	var oldRecording = new File(srcpath);
	
	trace("oldRecording is - "  + oldRecording);
	
	if(oldRecording.exists) {
	
	trace("oldRecording is exists - "  + oldRecording);	
		
		var backupPath = srcpath + "backup completed on " + ".flv";
				
		//oldRecording.renameTo(backupPath);
		
		oldRecording.copyTo(backupPath);
	
	}
}


What I have tried:

When my streaming is done this event(application.backupExistingFile) is fired but I want to do backup that existing file first and then upload to this new one.

I am trying to upload file to another pc, but first I am trying to make a backup of existing .flv file.

Also I am not able to map source file path to perticular directory instead C:\Program Files\Adobe\Adobe Media Server 5\applications\...


Please help me to do this.
Posted
Updated 16-Mar-16 0:12am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900