Skip to content

Instantly share code, notes, and snippets.

@harmy
Created December 19, 2011 06:01
Show Gist options
  • Save harmy/1495629 to your computer and use it in GitHub Desktop.
Save harmy/1495629 to your computer and use it in GitHub Desktop.
在当前目录下建立所有tga文件的同名文件夹,并把tga文件移动到各自文件夹内
import os, shutil, glob
[os.mkdir(file[:-4]) for file in glob.glob("*.tga")]
[shutil.move(file, file[:-4]) for file in glob.glob("*.tga")]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment