public static void deleteDeviceFile(string file) { using (RemoteDeviceManager r = new RemoteDeviceManager()) { using (RemoteDevice device = r.Devices.FirstConnectedDevice) { string myDocs = device.GetFolderPath(SpecialFolder.MyDocuments); if (RemoteFile.Exists(device, myDocs + "\\" + file)) { RemoteFile.Delete(device, myDocs + "\\" + file); } else { Console.ForegroundColor = ConsoleColor.Red; Console.Error.WriteLine("El archivo " + file + " no existe"); Console.ResetColor(); } } } }