string targetPath = @"C:\Program Files\saadhvi\SetupSafetyPADUniversal\";
string createDatabasesScriptFilePath = Path.Combine(targetPath, "\\EADBScripts\\CreateDatabases.sql");
i am getting the value of createDatabasesScriptFilePath is \EADBScripts\CreateDatabases.sql
but i expected it would be C:\Program Files\saadhvi\SetupSafetyPADUniversal\EADBScripts\CreateDatabases.sql
what is the wrong with my code?
Remove the first \ from the string “\EADBScripts\CreateDatabases.sql”
I’m not completely sure of the reason, but a I guess Path.Combine wants as second parameter a relative path, and a relative Path does not start with a \.