um22

sync csgo cfg's across all accounts.

Mar 24th, 2023
662
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | Gaming | 0 0
  1. from shutil import copy
  2. import os
  3.  
  4. STEAM_ID = "YOUR_STEAM_ID3_HERE"    # example: 401500991
  5. STEAM_PATH = "YOUR_STEAM_PATH_HERE" # default: C:\Program Files (x86)\Steam
  6.  
  7. TAIL_PATH = "/730/local/cfg"
  8. MAIN_PATH = STEAM_PATH + "/" + STEAM_ID + TAIL_PATH
  9.  
  10. def main():
  11.     sync = sync_cfg()
  12.     print("Successfully Synced {0} CFGs".format(sync))
  13.  
  14. def sync_cfg():
  15.     count = 0
  16.     for subdir, dir, files in os.walk(STEAM_PATH):
  17.         for file in files:
  18.             try:
  19.                 f = str(os.path.join(subdir, file))
  20.                 if STEAM_ID in f:
  21.                     continue
  22.                 if "730" in f and "config.cfg" in f:
  23.                     copy(MAIN_PATH + "/config.cfg", f)
  24.             except OSError as err:
  25.                 print("OS error: {0}".format(err))
  26.        
  27.     return count
  28.  
  29. if __name__ == "__main__":
  30.     main()
Advertisement
Add Comment
Please, Sign In to add comment