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 ?
Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | ASP.NET | ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Sign in to answer