Click here to Skip to main content
15,918,742 members
Home / Discussions / C#
   

C#

 
AnswerRe: Explicit type-casting of pointer Pin
harold aptroot7-Mar-13 21:57
harold aptroot7-Mar-13 21:57 
QuestionHow to highlight word in word document using C# Pin
Tridip Bhattacharjee7-Mar-13 3:56
professionalTridip Bhattacharjee7-Mar-13 3:56 
AnswerRe: How to highlight word in word document using C# Pin
Richard MacCutchan7-Mar-13 5:13
mveRichard MacCutchan7-Mar-13 5:13 
GeneralRe: How to highlight word in word document using C# Pin
Tridip Bhattacharjee8-Mar-13 1:46
professionalTridip Bhattacharjee8-Mar-13 1:46 
GeneralRe: How to highlight word in word document using C# Pin
Richard MacCutchan8-Mar-13 2:16
mveRichard MacCutchan8-Mar-13 2:16 
QuestionRe: How to highlight word in word document using C# Pin
Alan N7-Mar-13 5:17
Alan N7-Mar-13 5:17 
AnswerRe: How to highlight word in word document using C# Pin
Tridip Bhattacharjee8-Mar-13 1:47
professionalTridip Bhattacharjee8-Mar-13 1:47 
GeneralRe: How to highlight word in word document using C# Pin
Alan N8-Mar-13 3:12
Alan N8-Mar-13 3:12 
QuestionC# file access Pin
classy_dog7-Mar-13 1:52
classy_dog7-Mar-13 1:52 
AnswerRe: C# file access Pin
Dave Kreskowiak7-Mar-13 2:30
mveDave Kreskowiak7-Mar-13 2:30 
AnswerRe: C# file access Pin
Matt T Heffron7-Mar-13 8:49
professionalMatt T Heffron7-Mar-13 8:49 
QuestionHow to use sql server database into oracle Pin
Arun kumar Gautam7-Mar-13 1:04
Arun kumar Gautam7-Mar-13 1:04 
AnswerRe: How to use sql server database into oracle Pin
Simon_Whale7-Mar-13 1:14
Simon_Whale7-Mar-13 1:14 
AnswerRe: How to use sql server database into oracle Pin
jschell7-Mar-13 8:34
jschell7-Mar-13 8:34 
AnswerRe: How to use sql server database into oracle Pin
Gerry Schmitz7-Mar-13 19:38
mveGerry Schmitz7-Mar-13 19:38 
QuestionRetrieve Mongodb Images using GridFS C# Winforms Pin
ArunRajendran16-Mar-13 19:38
ArunRajendran16-Mar-13 19:38 
AnswerRe: Retrieve Mongodb Images using GridFS C# Winforms Pin
Eddy Vluggen6-Mar-13 22:48
professionalEddy Vluggen6-Mar-13 22:48 
QuestionC# in vb.net in windows base application Pin
Jinal Mistry6-Mar-13 19:30
Jinal Mistry6-Mar-13 19:30 
AnswerRe: C# in vb.net in windows base application Pin
Richard MacCutchan6-Mar-13 22:30
mveRichard MacCutchan6-Mar-13 22:30 
QuestionMonitoring Applications and Processes Pin
mphill47446-Mar-13 10:37
mphill47446-Mar-13 10:37 
AnswerRe: Monitoring Applications and Processes Pin
Jim Meadors6-Mar-13 19:49
Jim Meadors6-Mar-13 19:49 
AnswerRe: Monitoring Applications and Processes Pin
Bernhard Hiller6-Mar-13 23:24
Bernhard Hiller6-Mar-13 23:24 
GeneralRe: Monitoring Applications and Processes Pin
mphill47447-Mar-13 5:25
mphill47447-Mar-13 5:25 
AnswerRe: Monitoring Applications and Processes Pin
jschell7-Mar-13 8:40
jschell7-Mar-13 8:40 
Questionc# file directory structure change Pin
classy_dog6-Mar-13 10:19
classy_dog6-Mar-13 10:19 
In a C# 2008 desktop application I would like to know how to change the following code so that the files I am looking for can be located.
string Format_Date = DateTime.Now.AddMonths(-1).ToString("MM-yyyy");
    String filesaveLocation = null;
    filesaveLocation = Path.Combine(ConfigurationSettings.AppSettings["tLocation"], Format_Date);
    if (!Directory.Exists(filesaveLocation))
    {
        System.IO.Directory.CreateDirectory(filesaveLocation);
        logging.Error("The location " + filesaveLocation + " does not exist.");
        return packageId;
    }

   else
    {
       string[] RFiles = (from path in Directory.GetFiles(filesaveLocation)
                             let name = Path.GetFileName(path)
                             where name.EndsWith(".pdf") ||
                             name.EndsWith(".xlsx") ||
                             name.EndsWith(".xls")
                             select path).ToArray();

     }
        foreach (String RFile in RFiles)
      {
      }

The code was written for a directory path that looks like the following:
C:\Trans\01-2013 -Note the 01-2013 is for month and year.

Now I am finding out that the file directory stucture in production looks like the following:
R:\Trans\_JAN_2013\A-Sample. Under the A-Sample directory there are 4 separate subdirectories
called: SUB1, SUB2, SUB3, and SUB4.

I was expecting to see the files in one directory instead of 4 separate directories.

Thus can you show me code and/or tell me how you would change the code to accomodae the change in the file directory strucutre?

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

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