You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello your program is great.
The current source code looks for similar images and executes the save (copy) function. I am having trouble modifying the source to change the save to the move function.
File.Copy(image_path, copy, false); -> File.Move(image_path, copy, false);
System.IO.IOException_mscorlib.dll
Thanks for your help.
FindSimilarImages.xaml.cs
using (var dlg = new System.Windows.Forms.FolderBrowserDialog())
{
dlg.Description = "Select folder where the images will be saved";
dlg.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
dlg.ShowNewFolderButton = true;
var result = dlg.ShowDialog();
if (result == System.Windows.Forms.DialogResult.OK)
{
//save image of interest
var image_name = Path.GetFileName(image_of_interest);
var image_path = image_of_interest;
var copy = Path.Combine(dlg.SelectedPath, image_name);
if (File.Exists(image_path) && !File.Exists(copy))
{
File.Copy(image_path, copy);
}
//save similar images
foreach (var image in similar_images)
{
if (image == null)
{
continue;
}
image_name = image.ImageName;
image_path = image.ImagePath;
copy = Path.Combine(dlg.SelectedPath, image_name);
if (File.Exists(image_path) && !File.Exists(copy))
{
File.Copy(image_path, copy, false);
}
}
}
}
The text was updated successfully, but these errors were encountered:
Hello your program is great.
The current source code looks for similar images and executes the save (copy) function. I am having trouble modifying the source to change the save to the move function.
File.Copy(image_path, copy, false); -> File.Move(image_path, copy, false);
System.IO.IOException_mscorlib.dll
Thanks for your help.
FindSimilarImages.xaml.cs
using (var dlg = new System.Windows.Forms.FolderBrowserDialog())
{
dlg.Description = "Select folder where the images will be saved";
dlg.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
The text was updated successfully, but these errors were encountered: