Krishna Ramisetty

Krishna Ramisetty

  • 2.1k
  • 18
  • 1.9k

How to check file type exists or not from list

Aug 12 2021 5:23 AM

Hello Everyone, 

I want to validate my file type from below list 

doc,docx,xls,xlsx,ppt,pptx,pdf

if my given file name type exists in above list then only i need to process the file. else i need to ignore that file. how to check weather my file type exists in above list of file types

eg : my file name is : "D:\files\Get_Started_With_Smallpdf.pdf"

can you please help me on this

 

Thanks,

Krish


Answers (1)