## This script opens all sound files in a directory and then creates a TextGrid for each one. ## Specify the directory containing your sound files in the next line: directory$ = "H:\Acquisition\Exercise 1 Fricatives\cantonese" ## Now we make a list of all the sound files in the directory we're using, and put the number of ## filenames into the variable "number_of_files": Create Strings as file list... list 'directory$'\*.wav number_files = Get number of strings # Then we set up a "for" loop that will iterate once for every file in the list: for j from 1 to number_files # Query the file-list to get the first filename from it, then read that file in: select Strings list current_token$ = Get string... 'j' Read from file... 'directory$'\'current_token$' endfor select Strings list Remove select all To TextGrid... "WorldBet.KCH notes.KCH"