-
-
Notifications
You must be signed in to change notification settings - Fork 967
Open
Description
I'm trying to move file abc.txt to a different folder and file name using the following code:
var files = client.ListDirectory("MyFiles/In").ToList();
foreach (var file in files.Where(f => f.IsRegularFile)) {
var newFilePath = $"MyFiles/In/archive/{DateTime.Now:yyyyMMddHHmmss}-{file.Name}";
file.MoveTo(newFilePath);
}
When the source file name abc.txt already exists in the archive sub folder the library throws an exception with message Already exists even though the target file name will have a different name (prefixed with a date time stamp).
Metadata
Metadata
Assignees
Labels
No labels