managed to make a basic python script for renaming the audio files which will rename the audio file according to their enclosing folder..
for me the main advantage is that this way each sound file will have an unique file name and i wont have several T01.WAV files in the editing system which makes re-linking a pain.
if you're on OSX, you can start the script from the terminal by typing:
python /full/path/to/script_file.py
code below (or also on pastebin: http://pastebin.com/5uC2GQvU )
chris
#!/usr/bin/python
# rename_633.py
# v1.00
#
# python script for renaming the audio files of the
# sound devices 633 recorder
#
# it will help to make file names unique because by default
# the SD 633 will default to T01.WAV for each scene/day.
# the script in it's curremt state will rename the TXX.WAV
# files and add the directory to the name, so if you use daily
# folders the clips will be renamed to YXXMXXDXX-TXX.WAV
#
# it's a fairly straight forward python script, and does basic
# error checking, but as always make a backup of mission
# critical files before using it.
import os
def rename_633():
topdir = raw_input("main audio directory to process?: ")
# input checking of the topdirectory
if not os.path.isdir(topdir):
if os.path.isdir(topdir.rstrip()):
print "it seems you have entered a path with a trailing whitespace. remove the whitespace and try again? (y/n) "
remove_whitespace = raw_input()
if remove_whitespace != 'y':
exit(0)
else:
topdir = topdir.rstrip()
elif os.path.isdir(topdir.replace("","")):
print "it seems you have entered a path with spaces escaped with a backslash. remove the backslash and try again? (y/n) "
remove_backslash = raw_input()
if remove_backslash != 'y':
exit(0)
else:
topdir = topdir.replace("","")
else:
print "directory doesn't exist"
exit(0)
# finally rename the files
for root, dirs, files in os.walk(topdir):
for each_file in files:
if each_file.endswith('.WAV'):
folder_name = os.path.basename(root)
old_file_path = os.path.join(root, each_file)
# new file name will be generated, default is DIRECTORY-TXX.WAV
new_file_name = folder_name + '-' + each_file
new_file_path = os.path.join(root, new_file_name)
print 'renaming ' + old_file_path + ' to -> ' + new_file_path
# check for name collisions
if os.path.exists(new_file_path):
print "a file with that name already exists. stopping process"
exit(0)
else:
os.rename(old_file_path, new_file_path)
rename_633()