Renaming files compiled

For example I compile a project and put it “Test.exe” .
When compiling the notice that besides Test.exe is the folder Test_Data.
How can i rename the folder and files without giving an error ?

and use the File and Path class to find and rename the files

string path = Path.GetDirectoryName(pathToBuiltProject) + "/" + Path.GetFileNameWithoutExtension(pathToBuiltProject)+"_Data";