Added filelist

This commit is contained in:
2018-02-09 21:55:26 +01:00
parent cb8f1cbba9
commit a11fb3436f
4 changed files with 9 additions and 5 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -13,22 +13,26 @@ import h2inc_gui
tupline = []
preproc = ()
outfile = ''
folders = []
filelist = []
folderlist = []
cnt = 0
def sourcedir_filecnt(sourcedir):
### Return the number of files, ending with '.h', in sourcedir - including subdirectories ###
cnt = 0
global filelist
for folderName, subfolders, files in os.walk(sourcedir):
for file in files:
if file.lower().endswith('.h'):
cnt = cnt+1
cnt += 1
filelist += [file]
print(filelist)
return cnt
def sourcedir_foldercnt(sourcedir):
### Return the number of folders, if it contains '*.h' files, in sourcedir - including subdirectories ###
global cnt
global folders
global folderlist
for folderName, subfolders, files in os.walk(sourcedir):
if subfolders:
for subfolder in subfolders:
@@ -37,8 +41,8 @@ def sourcedir_foldercnt(sourcedir):
if tempf:
cnt = cnt+1
print(folderName)
folders += [folderName]
print(folders)
folderlist += [folderName]
print(folderlist)
return cnt
def process_files(sourcedir, destdir):