How to connect Mapped netwrok drive in uipath

Hello Team,
can any one please help me on below mentioned issue.
I need to connect to the network drive before moving file onto network drive .

Regards
Raj kumar

Try this
Move files by mapping a network drive
On the Start menu, click My Computer .

On the Tools menu, click Map Network Drive .

In Drive , select a drive letter.

In Folder , type the name of the Web server and documentlibrary in the form \ Server_Name \ Document_Library .

The mapped network drive opens in Windows Explorer toshow the contents of the document library.

Open a Windows Explorer window, and then find the folder withthe files that you want to copy to the document library.

Select the files you want, and then drag them into the documentlibrary in the mapped network drive.

Network drive is already mapped and we are using move file with network path its is working fine , but some time it throws exception stating that mapped drive is not connected , so do we have any way to check connectivity of network drive , if it is disconnected and than connect and move file using move file activity

1 Like

Hi,

You can check this by using “dir.Exists(“z:”)” command in a If Activity.
dir is a variable with System.IO.Directory type.

Sorry for bother you.

Did you resolve this issue? I’m having the same problem

Hi @dianamlopez

I don’t recommend using mapped drives with automation. They are essentially just a representation of the actual network location.

If you can get the full path to the location you want to access, test access by typing this location in Windows Explorer:
image

Then, just use that path as your path rather than using a mapped drive letter.

If you really need to automate drive mapping then I suggest calling a commandline script, but you shouldn’t need to unless there is a really old application that requires it.

Regards.

2 Likes

I second clayton’s suggestion. We have had some issues where a mapped drive letter was needed, so in those rare instances we use a powershell script to map it. However, you should always use the full path rather than the drive letter whenever possible

Connect_Map_Network_Drive.xaml (18.2 KB)
Hi, Please try with this code.