Could not find the part of the path exception

Hi All,

my robot is failing due to exception could not find the part of the path it is trying to access the path stored in config file using directory.getfiles(filepath)
File path:I:_ART Support Functions\02. Human Ressources\5. PAYROLL SI ADMIN\RPA\Scan Acte aditionale\Scaned PDFs\NEW

@vishal_nachankar

hi try this once

Directory.GetFiles(“your_folder_path”,“.”, SearchOption.AllDirectories)

cheers

Hi @vishal_nachankar
The problem was with your path only
can you check the path exist or not by Windows + r in keyboard and paste the path it will show the path exists or not

Hi @vishal_nachankar

If you are trying to access the files from config files try below

Directory.GetFiles(in_Config(“filepath”).ToString)

filePath = "I:_ART Support Functions\02. Human Ressources\5. PAYROLL SI ADMIN\RPA\Scan Acte aditionale\Scaned PDFs\NEW "

files = Directory.GetFiles(filePath)
variable type:string

I think you are missing a backslash after the drive name.

I:\_ART Support Functions\02. Human Ressources\5. PAYROLL SI ADMIN\RPA\Scan Acte aditionale\Scaned PDFs\NEW

the \ is present in the path i just missed to present in the query

Can you verify that the folder exists? And if it’s a network drive, that you have mapped it correctly.

Yes it is a network drive

Folder also exists in the drive

Have you mapped the network drive to the robot machine? And on the robot machine, are you able to open the folder in file explorer?

Actually i dont have the access the prod machine… if we dont have the access then do we get the same error ?

i am trying to connect with support team and check access if robot has it