Python Forum

Full Version: Looping through Folder structure and get files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have this folder Structure:
\\serverName\ExternalData\:
BPM
CRM
DDM

I want to go to \\serverName\ExternalData\BPM and get the latest file, process it (take two fields and put it in the list)

df = main_df[['Account Id', 'Permission Name']]
main_lst = df.values.tolist()
# print(main_lst)
then go to \\serverName\ExternalData\CRM, get the latest file, process it (take two fields and put it in the list, a different list)
then go to the third folder and do the same as well.

Please help.