How to get the size of all folders in the RDP server

Hi team,

I am trying to get the size of all specific folders in the Remote desktop server and i need to send a mail to a team about that these folders were occupying more space.

Steps already done:
Connecting to the Remote desktop from the local desktop using Hot key activity like Win+r.

Then now i am facing issue like how can i get size of files from the Folders in RDP.

if it is in local where uipath installed i can easily use assign and for each activities to iterate files and get the size. Here in Remote server how can i do it ???

Really need you guys help!!!

Pleased advise me !

regards,
Sriram

Hi @Sriram07

Check this

Thanks
Ashwin S

@AshwinS2
Thanks and my use case is little different.
I need to get the size of folder from the Remote desktop server So tell me how can i access a files in the remote desktop please.

hi @Sriram07
Use type into in cmd prompt and try type into sharepath of remote desktop server and try to do the implementations

Thanks
Ashwin S

Cmd prompt of RDP server or local desktop?
if in RDP server, just say i got the folders tell me that how to iterate all the files?

Can you explain how you connect to the RDP server files?

Do you have it as a commonshare like some “X” folder in the my computer folder or you have to give the IP to connect?

Commonshare in my local :

image

to get the files size and info, give the input to system.io.fileinfo(“”)

Check this thread

If it is like commonshare, you need to give as “X:\MyFolder”

if it is with IP, you need to give it as “10.108.198.63\Myfolder”

sorry i can’t understand this.

but CommonShare drive is not there!!!

See i will try to explain i don’t have UiPath installed in my rdp okay!
It was installed in my local desktop only. So i am automating the connection to the RDP itself using hotkey activities like Win+r.
**image **

So my total main workflow is going to execute in the RDP only.
So here i have to get all the folders okay?using directory.getfiles(“path”)

Say path of the folder is looks like \C:\MyFolders\CheckFolders.
if i give this path in the UiPath (which installed in local desktop) it was popping out with an error like “There is no valid path”. I guess that it will find the path in the local desktop only right! instead of RDP.

So will you tell me how can i access all the files. i tried by giving
“\walter-pc\c:\MyFolders\CheckFolders”.

It is also not working.

Not with IP we are using like name “Walter-pc” .

Please advise @HareeshMR buddy,
it was eating my head.

You don’t need to open or connect to RDP @Sriram07

Simply use the IP and get the files from the remote machine .

Can you check the following steps and let me know the results

  1. Get the IP of the machine just by running the command ping walter-c
  2. Using that IP, check if it is getting the files in the directory as Directory.GetFiles(“\10.108.193.63\folders”)

If it is retrieving the folders inside the remote, you will be able to do it in the local itself

Can you confirm whether the RDP machine is within your network or outside?

Thanks so much for your time @HareeshMR.

No it is from outside.

i will do and update.

Yeah,

Here you need to place two back slashes @Sriram07. UiPath is not showing you the two here in the forum. make sure you gave two

The correct syntax is \\walter-pc\c$\MyFolders\CheckFolders.

1 Like