How to Set directory path for multiple files with given extension in app.config in c# -
i able set path of particular file given filename in app.config using:
<add key="filepath" value="\c:\users\public\pictures\sample pictures\abc.jpg"/>
but when want set path "*.jpg" , i.e. retrieving multiple filenames jpg extension, facing problems in using wildcard character *.
how should give value in appsettings?
thanx !!!
when read value in, can't parse wildcard , perform multiple filename retrieval then?
<add key="filepath" value="\c:\users\public\pictures\sample pictures\*.jpg"/> string path = configurationmanager.appsettings["filepath"].tostring(); if(path.getfilenamewithoutextension(path) == "*") { //get multiple files }
Comments
Post a Comment