internal void DownloadRecordingSession(User AccessingUser,RecordingSessions ARS, string sDestination,bool IncludeAttachments, bool ShowProgress,ref OCL.FTPTransfer FT) { try { FT.ConnectToOysterServer(ServerAddress); //FT.ConnectToOysterServer("ome-prototype"); } catch(Exception Err) { throw new Exception(Err.Message); } int NumberOfDownloadingFiles = 0; foreach(RecordingSession RS in ARS) { foreach(Recording R in RS.CurrentRecordings(AccessingUser)) { string peek = R.Description; NumberOfDownloadingFiles++; } if(IncludeAttachments) { foreach(Note N in RS.AllVisibleNotes(AccessingUser)) { foreach(Attachment A in N.FileAttachments) { string peek = A.mvarStoredName; NumberOfDownloadingFiles++; } } } } string[] sDest = new string[NumberOfDownloadingFiles]; string[] sStoredNames = new string[NumberOfDownloadingFiles]; int i = 0; foreach(RecordingSession RS in ARS) { foreach(Recording R in RS.CurrentRecordings(AccessingUser)) { //string safeName = RenameFile(R.DisplayName,".wmv",sDestination); string safeName = RenameFile(RS.Description + "_" + R.DisplayName,".wmv",sDestination); sDest[i] = sDestination + @"\" + safeName; // sDest[i] = sDestination + @"\" + R.DisplayName + ".wmv"; sStoredNames[i] = R.Description; i++; } if(IncludeAttachments) { foreach(Note N in RS.AllVisibleNotes(AccessingUser)) { foreach(Attachment A in N.FileAttachments) { sDest[i] = sDestination + @"\" + A.StoredName; sStoredNames[i] = A.StoredName; i++; } } } } FT.DownloadFile(sDest,sStoredNames,ShowProgress); }