Hi,
Is it okay to use relative paths for directories or files for example, directory.getFiles() or FileExists(). Or is it needed to give Absolute Path. If I have a sub folder Data, can I use directory.getFiles(“Data”) ?
Thanks a lot,
Hi,
In most cases, we can use relative path. However, in some cases, it might be better to use absolute path to prevent trouble in advance. (Because current directory is not same b/w run from studio and run from process (UiPath assistant or Orchestrator, for example)
path = System.IO.Path.Combine(System.Environment.CurrentDirectory,"Data")
System.IO.Directory.GetFiles(path)
Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.