Click here to Skip to main content
       

C#

 
GeneralRe: C# obtain return code from a proxy Pinmemberdojohansen10-Oct-12 5:52 
GeneralRe: C# obtain return code from a proxy Pinmemberdcof10-Oct-12 16:00 
GeneralRe: C# obtain return code from a proxy Pinmemberdojohansen10-Oct-12 23:33 
QuestionRender Excel document to word document using C#.net PinmemberUllas_Joseph9-Oct-12 22:35 
AnswerRe: Render Excel document to word document using C#.net PinmemberMarco Bertschi12-Oct-12 5:03 
QuestionSheet name is missing when doing a "SAve As" for Excel document to PDF PinmemberUllas_Joseph9-Oct-12 21:24 
AnswerRe: Sheet name is missing when doing a "SAve As" for Excel document to PDF PinprotectorPete O'Hanlon9-Oct-12 22:55 
QuestionC# exclude file from directory search [modified] Pinmemberclassy_dog9-Oct-12 17:51 
In a C# 2010 application, I am currently using the following to statements to select files for *summ.xls files.
 string[] files = Directory.GetFiles(C:\temp\09_20_2012\CUSTOMER1, "*summ.xls",SearchOption.AllDirectories);
 
string[] files = Directory.GetFiles("C:\\temp", "*summ.xls", SearchOption.AllDirectories);
 
However now I need to exclude the following kind of files from the next directory search:
1. *summ.xlsx,
2. *report.xlsx,
and
3. invalid*.xlsx. In this case the files start with the word invalid and the rest of the file name can be anything. However these files are also of type *.xlsx.
Thus for like the statement,
 "string[] files = Directory.GetFiles("C:\\temp", "*summ.xls", SearchOption.AllDirectories);",
can you tell me how would I change the statement above to exclude the specific file names I just listed above?
Can you show me how to make this coding change and/or point me to a reference I can use to solve the problem?

modified 10-Oct-12 0:01am.

AnswerRe: C# exclude file from directory search Pinmembern.podbielski9-Oct-12 21:00 
AnswerRe: C# exclude file from directory search PinmvpOriginalGriff9-Oct-12 21:07 
QuestionHow to draw on web page? PinmemberMember 5414189-Oct-12 9:31 
AnswerRe: How to draw on web page? PinprotectorPete O'Hanlon9-Oct-12 9:54 
GeneralRe: How to draw on web page? PinmemberMember 5414189-Oct-12 10:29 
GeneralRe: How to draw on web page? PinprotectorPete O'Hanlon9-Oct-12 10:35 
GeneralRe: How to draw on web page? Pinmembery.dsandeepnaidu9-Oct-12 20:11 
GeneralRe: How to draw on web page? PinprotectorPete O'Hanlon10-Oct-12 0:43 
SuggestionCompare Types Question PinmemberKevin Marois9-Oct-12 7:18 
GeneralRe: Compare Types Question PinprotectorPete O'Hanlon9-Oct-12 7:27 
GeneralRe: Compare Types Question PinmemberKevin Marois9-Oct-12 7:31 
GeneralRe: Compare Types Question PinprotectorPete O'Hanlon9-Oct-12 7:55 
GeneralRe: Compare Types Question Pinmemberdojohansen10-Oct-12 3:12 
GeneralRe: Compare Types Question PinmemberBobJanova10-Oct-12 0:35 
QuestionRe: Compare Types Question PinmentorDaveyM6910-Oct-12 1:06 
AnswerRe: Compare Types Question PinmemberBobJanova10-Oct-12 1:45 
QuestionWeka To C# Problems Pinmemberkimo_4u9-Oct-12 5:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 1 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid