Skip to content

Instantly share code, notes, and snippets.

@marcusbirkeland
Last active September 10, 2021 03:49
Show Gist options
  • Save marcusbirkeland/36d4c59005d0cc2a099ab5d7f1348962 to your computer and use it in GitHub Desktop.
Save marcusbirkeland/36d4c59005d0cc2a099ab5d7f1348962 to your computer and use it in GitHub Desktop.
[Kaineconv] Add XAP extensions to tex_ files
import os
import re
dir_path = os.path.dirname(os.path.realpath(__file__))
def rename(f):
os.rename(dir_path+'\\'+f ,dir_path+'\\'+f+'.xap')
files = [f for f in os.listdir(dir_path) if os.path.isfile(os.path.join(dir_path,f))]
for f in files:
if re.match("tex_",f):
rename(f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment