Created
May 4, 2016 17:31
-
-
Save renexdev/95ee96b9137673e4e7b812afe8ff5222 to your computer and use it in GitHub Desktop.
Rename files implemented in pulse files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
################################################################################## | |
# Rename files | |
# Rel. 05/2016 | |
# Dr. Rene Cejas Bolecek | |
# Low Temperatures Laboratory, CAB, Argentine. | |
# email: reneczechdev@gmail.com | |
###### | |
import glob | |
import shutil | |
files = files = glob.glob('*.dat*') | |
for f in files: | |
original = f | |
y = f.split('.dat') | |
print y[0] | |
print y[1] | |
intval = int(y[1]) | |
shutil.move(f, y[0]+'_%.02d'%(2*intval+1)+'.dat') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment