for filePath in fileList:
global fileSplit
if platform.system().lower() == 'windows':
fileSplit = filePath.split("\\",maxsplit=-1)
elif platform.system().lower() == 'linux':
fileSplit = filePath.split(r"/",maxsplit=-1)
for filePath in fileList:
global fileSplit
if platform.system().lower() == 'windows':
fileSplit = filePath.split("\\",maxsplit=-1)
elif platform.system().lower() == 'linux':
fileSplit = filePath.split(r"/",maxsplit=-1)