Puedes intentar reemplazando esto:
Código:
if os.path.isfile(fullname):
# Get the extension-based template string
srctxt = avsp.GetSourceString(fullname)
# Create the script string
# Write the script text to a file
f = open(fullname + '.avs', 'w')
f.write(srctxt)
f.close()
Por esto:
Código:
if os.path.isfile(fullname) and fullname[-4:].lower=='.avi':
# Get the extension-based template string
srctxt = avsp.GetSourceString(fullname)
# Create the script string
# Write the script text to a file
fullname = fullname[:-4]
f = open(fullname + '.avs', 'w')
f.write(srctxt)
f.close()
Me avisas si te funciona. Saludos