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
import fnmatch | |
import os | |
MY_DIR = 'Q:\\my_dir\\sub_dir' | |
FILE_EXT = 'xml' | |
def filter_files_by_ext(dir, filter_ext): | |
files = [file for file in os.listdir(dir) if fnmatch.fnmatch(file, '*.%s' % filter_ext)] | |
return files |
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
from os import listdir | |
from os.path import isfile, join | |
MY_DIR = 'Q:\\midir' | |
def execute(): | |
onlyfiles = [f for f in listdir(MY_DIR) if isfile(join(MY_DIR, f))] | |
print(onlyfiles) | |
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
git config --global alias.superlog "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(reset)%C(bold yellow)%d%C(reset)' --all" |
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
// GLOBALS | |
//Array of file extension which you would like to extract to Drive | |
var fileTypesToExtract = ['pdf', 'xml']; | |
//Name of the folder in google drive i which files will be put | |
var folderName = 'LabelMOD'; | |
//Name of the label which will be applied after processing the mail message | |
var labelName = 'LabelMOD'; | |
NewerOlder