# Use a textgrid specified in the first command # Work on all files in "directory" # Eliminate zeros from the "sound" # Write wave files in "outdir" Read from file... C:\Documents and Settings\Reiko\Desktop\Test\j_kta_r_zero.TextGrid textgrid = selected ("TextGrid") directory$ = "C:\Documents and Settings\Reiko\Desktop\Test3\" outdir$ = "C:\Documents and Settings\Reiko\Desktop\Test4\" Create Strings as file list... list 'directory$'*.wav sound = selected("Strings") number_of_files = Get number of strings for i from 1 to number_of_files select sound current_file$ = Get string... 'i' Read from file... 'directory$''current_file$' sound_id = selected("Sound") sound_name$ = selected$("Sound") select sound_id plus textgrid Extract intervals... 1 no sound Write to WAV file... 'outdir$''sound_name$'.wav endfor print 'newline$'Zero removing completed!'newline$'