Hi,
I have a folder and want to get files. Directory.GetFiles do it but sometimes this folder include another folder(or folders) and I have to get files in this folder(or folders) too. And 2. folder can include 3. folder. ofcourse I have to get files in 3. folder too.
Srini84
(Srinivas Kadamati)
December 7, 2021, 10:18am
2
@murat.karasoy
Check below post for your reference
I am looking to get a list of documents withing a specific directory Directory.GetFiles(“address”).
This is giving me the complete file name but cannot figure how to get this broken down to the individual document names
Hope this will help you
Thanks
ppr
(Peter Preuss)
December 7, 2021, 10:18am
3
we can retrieve files from folders and subfolders e.g. by:
Directory.GetFiles(MyDirPathVar,"*.*",SearchOption.AllDirectories)
taken from:
This CheatSheet introduces the basic use of available functionalities provided by the .Net API in order to deal with the filesystem. With further examples also special cases are presented.
Basic Usage
System.IO.Directory
Directory offers some static methods for basic operations on folder and subfolders
arrFullFilePaths | String() = Directory.GetFiles("C:\_demo\FileSystem\SubfolderA")
Visuals
System.IO.DirectoryInfo
The DirectoryInfo class offers instance methods for basic operations on fol…
2 Likes
Srini84
(Srinivas Kadamati)
December 7, 2021, 10:19am
4
@murat.karasoy
Also check below for your reference
Hello
How can I get the names of all folders and subfolders?
I tried
Directory.GetDirectories(all_folder_path) - But finds only one folder
Directory.GetDirectories(all_folder_path , "" , SearchOption.AllDirectories)
and if so does not find anything
[image]
I am hope for your help
Thank’s
Hope this will help you
Thanks
Hi
Use a simple assign activity like this
Where arr_files is a variable of type array of files
Cheers @murat.karasoy
system
(system)
Closed
December 10, 2021, 10:41am
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.