InnovativeStudios

keys.py

Jun 11th, 2023
921
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. import glob
  2. import os
  3. import shutil
  4.  
  5.  
  6. def copy(moddir):
  7.     keys = glob.glob(os.path.join(moddir, "**/*.bikey"))
  8.     if len(keys) > 0:
  9.         for key in keys:
  10.             if not os.path.isdir(key):
  11.                 shutil.copy2(key, "/arma3/keys")
  12.     else:
  13.         print("Missing keys:", moddir)
  14.  
  15.  
  16. if __name__ == "__main__":
  17.     for moddir in glob.glob("/arma3/steamapps/workshop/content/107410/*"):
  18.         copy(moddir)
  19.  
Advertisement
Add Comment
Please, Sign In to add comment