Created
June 1, 2015 00:16
-
-
Save UVClay/5161e96882e5bd25ca05 to your computer and use it in GitHub Desktop.
Move workshop maps to the main directory
This file contains hidden or 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
__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