Exception The target file is a directory, not a file. on file.copy
ahmed salah
3,216
Reputation points
I work on asp.net core 3.1 web api
I get exception error as below :
Exception The target file is a directory, not a file. on file.copy
this lines generated exception
System.IO.File.Copy(OutputfilePath, Path.Combine(exportDirectory, fileName), true);
Path.Combine(exportDirectory, fileName) is : “\\192.168.2.7\\ImportExport\\2\\Export\DeliveryGeneration_Input (69)-af650a86-ea90-40c1-86da-74f4b2c8132e.xlsx”
OutputfilePath is : “\\192.168.2.7\\ImportExport\\2\\Export\DeliveryGenerationOutput.xlsx”
two files can access and open it when i open on fil explorer but issue
as error above
so How to solve this issue please ?