Getting list of files from folder

jakeg023

New Member
I'm trying to get a list of files from a folder, store them in a collection, and then use that collection to loop through the files in the folder and extract data from them. I see the "Get Files" in the String VBO, but can't see to get it to work correctly.

Thanks in advance!
 

VJR

Well-Known Member
Hello jakeg023,

You mentioned you are not getting the Get Files to work correctly.
Are you getting any error message or no files returned at all?
Refer the below screenshots.
If you give the Pattern as *.* it will return all files with all extensions, else "*.txt" as shown below.
 

Attachments

  • Get Files.JPG
    Get Files.JPG
    31.1 KB · Views: 1,823
  • Output collection.JPG
    Output collection.JPG
    66.5 KB · Views: 1,672

jakeg023

New Member
hey all. this seems to have worked! the issue I was having was with the pattern part of the "Get Files", I wasn't sure what to put in that!

Thanks guys.
 

kaushikn123

New Member
hey all. this seems to have worked! the issue I was having was with the pattern part of the "Get Files", I wasn't sure what to put in that!

Thanks guys.
Hi Jake,

Can you please tell me how to store the extracted data in a separate file, say CSV file?
Thanks!
 

SNTLVEL

New Member
Hi,

Can anyone tell me how to get latest filename from the folder based on lastwritetime..

Thanks in advance.....!
 

yogeshp4

New Member
Hello jakeg023,

You mentioned you are not getting the Get Files to work correctly.
Are you getting any error message or no files returned at all?
Refer the below screenshots.
If you give the Pattern as *.* it will return all files with all extensions, else "*.txt" as shown below.
Hi VJR,
I need to read the files to get row count from whose files which recently added to folder. I'm able to get those files but not able to read(get row count).
Can you help m in resolving the same.
Thanks in advance.
Yogesh
 

Pete_L

Active Member
Use the BP VBO called Utility - File Management. There is an action called Get Files, where you provide the folder path, the search pattern needed to find the files, and it outputs information regarding each file it finds into a collection. The output data fields include the Path, Folder, Name, Extension, Created DateTime, Last Accessed DateTime, Last Written DateTime, Read Only, and Bytes.

You could use the Created/Accessed/Last Written dates to determine the timeframe, or you could parse the date from within the Name value. I recommend looping through the Files collection and testing each file to see if it is a current month file. If it is, do your process steps. If it isn't, go to the end of the loop and try the next filename.
 

Raj333145

New Member
When i am trying to get the files using Get Files action in File Management Utility, i am facing an error with related to the File Path which i have provided as input parameter. The file path is correct, and i do have access to that particular folder but when trying to get files using BP, i am getting Exception that File Path is not correct (Could not find a part of the path ). It runs sometime and for some paths and not for some other paths. I have tried by adding Retries but still no luck. Have anyone faced this issue?
 

sahil_raina_91

Active Member
When i am trying to get the files using Get Files action in File Management Utility, i am facing an error with related to the File Path which i have provided as input parameter. The file path is correct, and i do have access to that particular folder but when trying to get files using BP, i am getting Exception that File Path is not correct (Could not find a part of the path ). It runs sometime and for some paths and not for some other paths. I have tried by adding Retries but still no luck. Have anyone faced this issue?

There is no input for File Path in "Get Files" Action.
You need to provide Folder Path where the files are stored (NOT the File Path)
Please verify if you are using File path instead of Folder path.

Also, screenshots with inputs and error message will help us figure out the issue faster.
 
Last edited:

Dinesh@21

New Member
Hi,
i got items from queue and based on certain criteria i marked some item as completed and some item as exception and now i want to move the completed files from queue to one folder and exception file to the another folder which i created in desktop..please help me out how to get the files from queue and store in the specified folder.
 
Top