A background worker is simply a thread with progress callback and cancellation mechanisms attached. If you spawn an ordinary thread and want to call back into the GUI thread for progress, you'll just end up reimplementing a background worker.
foreach (string newPath in Directory.GetFiles(sourcePath, "*.*", SearchOption.AllDirectories)) { File.Copy(newPath, newPath.Replace(sourcePath, targetPath), true);}
var files = Directory.GetFiles(sourcePath, "*.*", SearchOption.AllDirectories);for (int i = 0; i < files.Count(); i++) { var newPath = files[i]; File.Copy(newPath, newPath.Replace(sourcePath, targetPath), true);}
var files = Directory.GetFiles(sourcePath, "*.*", SearchOption.AllDirectories);int i = 0;while (i < files.Count()) { var newPath = files[i]; File.Copy(newPath, newPath.Replace(sourcePath, targetPath), true); i++;}
1.2 < 1.33.5 < 10.51 < 1beta31beta3 < 1.3
1.2 < 1.33.5 < 10.51 < 1beta31beta3 < 1.3
1.2 < 1.33.5 < 10.51 < 1beta31beta3 < 1.3