# Write Text File to Network Path

Simple issue, I think. Have one automation running .net 461 legacy that I can write to a network path “\\servername\share\file.txt” but another automation that tells me the path is invalid that is running .net5 or higher. What is the correct syntax for a windows file share in dotnet 5?

1 Like

May be try with below options pls…

1. Add only one slash at the beginning

2. Or map the shared to a local drive and then try using the path

Thanks
#nK

If its a network path you need to pass complete UNMAPPED path.