The while loop stop when data reads x, but the buttonTransfer button never gets enabled
and the MessageBox message never shows up, but the program does not either freeze. What can be the problem with this code?
buttonTransfer.Enabled = false...
When I pushed the Transfer button a second time, I get the this error message, System.InvalidOperationException: 'This BackgroundWorker is currently busy and cannot run multiple tasks concurrently.' Can someone help me with this problem?
private void buttonTransfer_Click(object sender, EventArgs...
I have also tried this, but with no success.
string originalFiles = Directory.GetFiles(sourcePath, "*", SearchOption.AllDirectories).Where(f => !Path.GetFileName(f) == @sourcePath + "System Volume Information").ToArray();
Is this a bad approach?
KenEkholm-3624 asked • 1 sec ago
Cancel function does not work this code below. Can someone tell me what is wrong with this code?
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
Array.ForEach(originalFiles, (originalFileLocation) =>
Can someone help me how to skip system volume information with this code?
string originalFiles = Directory.GetFiles(sourcePath, "*", SearchOption.AllDirectories);
logFile.Add("Begin SyncDrive backup procedure.");
This code only copies new and modified files under E:\Document but leaves all the subfolders and their new and modified files uncopied.
How do I also get the subfolder's new and modified files also copied?
const string sourcePath = @"E:\Document";
const string destPath = @"D:\Test"...
I don't get any error message if type a faulty computer name with the code below this text.
Can someone help me, how I can get it done?
buttonStatus.Enabled = false;
statusComputer = textBoxComputer.Text;
I have a problem with this code below this text,
more particularly with this row prog.StandardInput.WriteLine(@"systeminfo | findstr / B / C:"Host Name" / C:"OS Version"");
How to write the line or define it correctly, that will work with this program?
ProcessStartInfo status = new...
I have also tried to use LINQ like this but this line does work.
string originalFiles = Directory.GetFiles(sourceFolder, "*", SearchOption.AllDirectories).Where(f => !f.Contains("System Volume Information").ToString())
Can someone help me?
I get this error message 'Access to the path 'F:\System Volume Information' is denied.' when I run the code below this text.
How can I ignore 'System Volume Information'?
string originalFiles = Directory.GetFiles(sourceFolder, "*", SearchOption.AllDirectories);
I have problem with the code below this text. It doesn't show any decimals, only the number 0. Can someone help me to correct this code, so it shows also the decimals. In this case it enough with 2 decimals.
answerCount = 5 / 20;
answerCount = Math.Round((Double)answerCount, 2);
For the moment I can only get the subfolders name of C:\Backup folder to the first column of the listBoxComputer.
Have do I get also the last written date of subfolders to the second column of the listBoxComputer?
private string rootDir = @"C:\Backup";
private void FormView_Load(object...