Current Path of Directory

There are some files in a folder. I want that file name one by one. But the issue is, I am not getting the current path as the path is dynamic.
Thanks in advance.

Regards,
Hemal

4 Likes

In assign activity urvariable 1= Directory.GetFiles(“ur file path folder”)
than use foreach activity and store ur urvariable1
than use assign actvity urvariable2 = Path.GetFileName(foreachname)

1 Like

@hemal, Along with @indra’s solution, You can use Environment.CurrentDirectory to get the path in which you are working !

Regards,
Dominic :slight_smile:

22 Likes

Hi @599712
it’s showing me the different path. My path is in a drive and it is showing me a desktop path.

1 Like

Hi @indra,

That’s true. AS it will work. But the thing is the path is dynamic. Like, I already have an assighed variable, for e.p. Zippath.
where the path is -
“D:\1_2017_11_12-1827”
But I need to access -
“D:\1_2017_11_12-1827\Q2_2017_CC3.2.1_APM659\CC3.2.1”.

Hope you get my point. there can be a folder in the particular path. In which I need to access each file.

Regards,
Hemal

1 Like

Hi ,

I have done it.
with Directory.GetDirectories(Directory.GetDirectories(zipPath)(0).ToString)(0).ToString

Thanks for your help.

:slight_smile:

5 Likes

:point_up_2::+1::+1::+1:

1 Like