Javatpoint Logo

HIGH PRIO: How to read all txt files from ALL the subfolders.

By: vibhud*** On: Tue Feb 06 17:53:24 IST 2018     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
I have created a JAR that reads all the txt files. But that reads from the absolute path or the specific path given.
But my intention is to read all the txt files from every subfolder.

For Eg. i have a folder C:\Demo and in that Demo folder i have 5 sub folder that consist txt files.
I want to read all txt files from all those 5 folders.

Please provide me the code for the same ASAP
Thanks & Regards,
Vibhushit
Up0Down