# This script wil open all wav sounds in specified directory. # You can filter the files, and just open the files starting with "File_filter" # # A modified version of # "open_all_files_in_folder.praat" by Mietta Lennes 24.1.2002 # # Changed: opens only wav-sounds, or files specified in "File filter". # John Tøndering 27.02.2002 # # Changed: you can select sound format. # John Tøndering 07.05.2002 # Modified: use preselected directory # John Tøndering 2003.05.15 - johtnd@cphling.dk form Open all sounds/Pitch-tiers in directory comment The path of the directory - choose from list: optionmenu Directory: 1 option Choose from list option E:\OB-udd\graenser\filtreret\ option E:\OB-udd\graenser\lyd\ option E:\OB-udd\graenser\data_indsamling\informant\ option E:\OB-udd\graenser\data_indsamling\inform_ufil\ comment or give the path - e.g. 'd:\sound\': text Directory_manual comment Give special filter - left passed (optional): text File_filter optionmenu Sound_format 1 option .wav option .au option .aiff option .aifc option .Pitch endform # If directory is chosen manually, select this directory if length(directory_manual$) > 0 directory$ = directory_manual$ endif Create Strings as file list... list 'directory$'* numberOfFiles = Get number of strings for ifile to numberOfFiles filename$ = Get string... ifile filter$ = file_filter$ filterlaengde = length(file_filter$) if left$ (filename$, 'filterlaengde') = filter$ # The next line gives the rule for the filename: soundlenght = length(sound_format$) if right$ (filename$, 'soundlenght') = sound_format$ Read from file... 'directory$''filename$' endif endif select Strings list endfor select Strings list Remove