Hi!
I’m trying to check the file name using getfiles I know.
But what does ‘directory.getfiles(path,“.”)’ mean?
Hi @dlqhqo98
Directory. GetFiles is a Fuction the Used to fetch the Files From the Folders.
Directory -->Specfies Your Folder.
GetFiles—>Specifies the Files in the Folder.
(“Path”,“FilterConditionBased on File Type”)–>Specfies (“YourDirectoryPath/”,“*.xlsx/txt/…”)
Regards
“.” means you read all files regardless what is the name and what is the file type.
If you want special name you can write → “Yourfilename."
If you want special file type but the name is not important, for example only Excel → ".xlsx”
But if you know the name and the file type, you can set both here → “Yourfilename.xlsx”
Best regards
Mahmoud
Hi @dlqhqo98
It means like
Eg:
Directory.Getfiles(path,“.pdf”)
Your current Directory of the local machine.Get the files in the (Specified path, which only has the extension of pdf )
Regards
Sudharsan
I wrote:
Directory.GetFiles(C:\Users\Belen\Downloads;“*.xlsx”)
And the error says:
Argumento ‘Value’: (1,122): error CS7017: Se esperaba una definición, una instrucción o un fin de archivo
you should be using
Directory.GetFiles("C:\Users\Belen\Downloads","*.xlsx")
Thank you, buy It’s didn’t work…
Neither this way:
Hi @bvaldez - Can you remove everything and type manually in Assign activity
Directory.GetFiles("FolderPath", "*.xlsx")
Output variable should be of type Array Of Strings
It’s doesnt work…
The variable, carpetadestino is array of string…
The language of my project is C#. How’d be the sintaxis?
@bvaldez Try either of this syntax
Hope this works.
@bvaldez - Can you try the below one
Directory.GetFiles (@"C:\yourfolderpath","*.xlsx")
Output variable should be of type Array Of Strings