Skip to content

Instantly share code, notes, and snippets.

@UVClay
Created June 1, 2015 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UVClay/5161e96882e5bd25ca05 to your computer and use it in GitHub Desktop.
Save UVClay/5161e96882e5bd25ca05 to your computer and use it in GitHub Desktop.
Move workshop maps to the main directory
__author__ = 'Clay'
import os, shutil
path = '/home/gungame/csgo/csgo/maps/workshop'
new = '/home/gungame/csgo/csgo/maps'
for dirname, dirnames, filenames in os.walk(path):
for filename in filenames:
fname_path = os.path.join(dirname, filename)
fext = os.path.splitext(fname_path)[1]
if fext == '.bsp':
shutil.copy(fname_path, new)
else:
continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment