System.IO.Path.GetFullPath not working with files stored on a remote desktop drive

Here is the FilePath i expect

"\\<Ip Adress>\Redirectionshare\<Name>\My Documents\UiPath\PayDay Loan_Kotak_SaS\Data\SAS File\LibraryChange.sas"

but im getting this

"\\<Ip Adress>\Redirectionshare\Data\SAS File\LibraryChange.sas"

So when i try to use start process activity it dosent open the file , niether with run command

Here is what i tried

System.IO.Path.GetFullPath("Data\SAS File\LibraryChange.sas")

@indiedev91

Can you try the below and check once

Environment.Currentdirectory+" \ "+“Data\SAS File\LibraryChange.sas”

Cheers

Please let us know if your project is set to Legacy compatibility or not

Actually i was trying to run the file , so by giving just Data/Sas File/filename.sas in the Start Process Activity

worked for me and the file was opened

Actually i was trying to run the file , so by giving just Data/Sas File/filename.sas in the Start Process Activity

worked for me and the file was opened

Yes my project was in windows-legacy compatiblity

@indiedev91

can you check once manually with the path which your are give in the start process

cheers

The point to GetFullPath is that for a file in the current folder, or a subfolder of the current folder (ie where the job is running) it will get you the entire path to the file. You don’t use it to get the path of a file that’s outside the current folder.

Is Data\SAS File in your project path? If it is, try “.\Data\SAS File\LibraryChange.sas”

However, I don’t recommend keeping files in the project folders like that. If you do, then you can’t change them without republishing the project. It’s better to create an external folder on a share accessible to your robots. You can store the path to this folder in a config file, and now you just know the path to your files and can change it in the config file if the folder moves (without republishing).

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.