i have many single data files in different formats. I look for a possiblity to create folders in Windows 10 in a given directory based on similarities of the files names (not on the same extensions of the single files). For example I show a small list of file names:
H_TS_02_024_026.xlsx
H_TS_02_024_026_prep.IRI
H_TS_02_024_026_prep2.Magg
H_TS_02_026_028.xlsx
H_TS_02_026_028_prep.IRI
H_TS_02_026_028_prep2.Magg
H_TS_02_060_062.xlsx
H_TS_02_060_062_prep.IRI
H_TS_02_060_062_prep2.Magg
So the idea is to create folders with the sample name following only using their common sample names to be used for the folders names:
H_TS_02_024_026.xlsx
H_TS_02_024_026_prep.IRI
H_TS_02_024_026_prep2.Magg
will end up in a folder and name of the folder will be
H_TS__02_024_026
containing the three files and for the next set of sample data it will be
H_TS_02_026_028.xlsx
H_TS_02_026_028_prep.IRI
H_TS_02_026_028_prep2.Magg
are contained in a folder named
H_TS_02_026_028
and so on. Thank you very much for your help and have a nice evening, CL