Say I have a list of directories:
/users/david/patients/patientID/Day
/users/david/patients/patientID/Daya/HospID_x/Data
/users/david/patients/patientID/Dayb/HospID_y/Data
/users/david/patients/patientID/Dayc/HospID_z/Data
/users/david/patients/patientID/Day
/users/david/patients/patientID/Daya/HospID_x/Data
/users/david/patients/patientID/Dayb/HospID_y/Data
/users/david/patients/patientID/Dayc/HospID_z/Data
/users/david/patients/patientID/Day
.
.
The data is mixed, contains images, vectors, text and so on.
I want loop through the directories and create a structure along the way to hold my data. I have generated a list of the folders of interest. The struct i want to have is of the form.
Patient{i,j}.PatientID.DayID.HospitalID.Data
As you can see from the directory list the first folder holds some subfolders, how do I loop through these.
Aucun commentaire:
Enregistrer un commentaire