def clampfit_rename(path,char):
assert len(char)==<NUM_LIT:1> and type(char)==str, "<STR_LIT>"<EOL>assert os.path.exists(path), "<STR_LIT>"<EOL>files = sorted(os.listdir(path))<EOL>files = [x for x in files if len(x)><NUM_LIT> and x[<NUM_LIT:4>]+x[<NUM_LIT:7>]+x[<NUM_LIT:10>]=='<STR_LIT>']<EOL>for fname in files:<EOL><INDENT>fname2 = list(fname)<EOL>fname2[<NUM_LIT:11>]=char<EOL>fname2="<STR_LIT>".join(fname2)<EOL>if fname==fname2:<EOL><INDENT>print(fname, "<STR_LIT>", fname2)<EOL><DEDENT>else:<EOL><INDENT>print(fname, "<STR_LIT>", fname2)<EOL><INDENT>fname=os.path.join(path,fname)<EOL>fname2=os.path.join(path,fname2)<EOL>if not os.path.exists(fname2):<EOL><INDENT>os.rename(fname,fname2)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return<EOL>
Given ABFs and TIFs formatted long style, rename each of them to prefix their number with a different number.

Example: 2017_10_11_0011.abf
Becomes: 2017_10_11_?011.abf
where ? can be any character.