private void MoveFileToFolder(string screenshotName) { if (string.IsNullOrEmpty(VideoCallPhotoManager.FolderDate)) { VideoCallPhotoManager.FolderDate = System.DateTime.Now.Year.ToString() + "-" + System.DateTime.Now.Month.ToString() + "-" + System.DateTime.Now.Day.ToString() + "_" + System.DateTime.Now.Hour + "-" + System.DateTime.Now.Minute + "-" + System.DateTime.Now.Second; } string oldPathToFile = photoNames[photoNames.Count - 1]; string newPathToFile = Path.Combine(Application.persistentDataPath, PhotoChecking.GetInstance.GetFolderName); if (!GlobalParameters.isSameSession) { Directory.CreateDirectory(newPathToFile); } SavePhotoSessionController.AddFile(FolderName, screenshotName); SavePhotoSessionController.Sawe(); try { File.Move(oldPathToFile, Path.Combine(newPathToFile, screenshotName)); Debug.Log("agora_: " + screenshotName + " move To: " + newPathToFile); photoNames[photoNames.Count - 1] = newPathToFile; photoSprites.Add(Path.Combine(newPathToFile, screenshotName), null); }catch (IOException e) { Debug.Log("File did not saved: " + e); Debug.Log(newPathToFile); return; } SpriteLoader.SaweSpriteMini(Path.Combine(newPathToFile, screenshotName)); }