Dec-29-2019, 07:15 AM
There is so many .wav files and create alot of these files everyday on Linux Host. I want to find all wav files that created yesterday ( a day ago when script run )on subdirectories and convert them to mp3 format with python script. I run os.walk ( path ) for finding '.wav' files but can not check that they was create yesterday.
Thanks in advance
for root, dir, files in os.walk(path): for file in files: if file.endswith('.wav'): wav = root + '/' + str(file) cmd = 'lame --preset insane %s' % wav subprocess.call(cmd, shell=True)Your answers can help alot.
Thanks in advance