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?
try
{
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
Actions
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.");
Array.ForEach(originalFiles...
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?
try
{
buttonStatus.Enabled = false;
statusComputer = textBoxComputer.Text;
ProcessStartInfo...
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);
Array.ForEach(originalFiles...
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.
double answerCount;
answerCount = 5 / 20;
answerCount = Math.Round((Double)answerCount, 2);
Can someone help me how I can get C:\test\ folder's subfolders and theirs last written date in two differents column with listview component?
Or give me some code tips?
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.