Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

py3 identify file extension

import os
source = ['test_sound.flac','ts.mp3']

for files in source:
   fileName,fileExtension = os.path.splitext(files)
   print fileExtension   # Print File Extensions
   print fileName   # It print file name
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #identify #file #extension
ADD COMMENT
Topic
Name
5+2 =