public void Sync(string filePath) { string[] currentFolders = ZuneSync.GetZuneMonitoredFolders(ZuneMonitoredFolders.MonitoredVideoFolders); bool found = currentFolders.Contains(filePath); //check if we are already added the files to the folder if (!found) { //copy the files to the first specified directory if (currentFolders.Length > 0) { string destinationPath = currentFolders[0]; string[] Files = Directory.GetFiles(filePath, "*.wmv", SearchOption.TopDirectoryOnly); foreach (var f in Files) { File.Copy(f, destinationPath, true); } } else { throw new ArgumentException("Zune is not configured to monitor *any* " + "folders, to fix this, open zune.exe, click settings, and add a video folder"); } } }
private void SyncToZuneAndiTunes() { if (settings.iTunesInstalled) { iTunesSync iTunes = new iTunesSync(); iTunes.Sync(settings.VideoPath); } if (settings.ZuneInstalled) { ZuneSync zune = new ZuneSync(); zune.Sync(settings.VideoPath); } }