Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8903909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:59:18+00:00 2026-06-15T01:59:18+00:00

I have the following code string[] dfFileWildCards = Helper.DataFeedsWildCards.Split(‘,’); string[] dfOriginalFilesPath = Directory.GetFiles(Helper.DataFeedsPath).Where(file =>

  • 0

I have the following code

            string[] dfFileWildCards = Helper.DataFeedsWildCards.Split(',');
            string[] dfOriginalFilesPath = Directory.GetFiles(Helper.DataFeedsPath).Where(file => new FileInfo(file).CreationTime.Date == DateTime.Now.Date).ToArray();

            Helper.MyWriteLine("-->DataFeeds Folder: " + Helper.DataFeedsPath);
            Helper.MyWriteLine("-->WildCards: " + Helper.DataFeedsWildCards);
            Helper.MyWriteLine("-->There are " + dfOriginalFilesPath.Length + " files");

            foreach (string filePath in dfOriginalFilesPath)
            {
                Helper.MyWriteLine("Checking " + filePath.ToLower());
                FileInfo file = new FileInfo(filePath.ToLower());

                foreach (string dfFileWildCard in dfFileWildCards)
                {
                    if (
                        file.Replace(" ", "").Name.IndexOf(dfFileWildCard.Replace(" ", ""), StringComparison.OrdinalIgnoreCase) > -1
                        &&
                        file.LastWriteTime.Date == DateTime.Now.Date
                        )
                    {
                        filesToCopy.Add(filePath.ToLower());
                        Helper.MyWriteLine("---->Marked for copy " + file.Name + ".");
                    }
                }
            }

It is showing error in log for d:\cnbrd\datafeeds\authorizeddatafeedfile_20121127.txt

11/28/2012 1:27:53 AM -->DataFeeds Folder: D:\CNBRD\DataFeeds
11/28/2012 1:27:53 AM -->WildCards: Inactive
11/28/2012 1:27:53 AM -->There are 7 files
11/28/2012 1:27:53 AM Checking d:\cnbrd\datafeeds\authorizeddatafeedfile_20121127.txt
11/28/2012 1:27:53 AM Exception occured: The path is not of a legal form.

Why is it so ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:59:19+00:00Added an answer on June 15, 2026 at 1:59 am

    The problem is here:

    file.Replace(" ", "").Name.IndexOf(dfFileWildCard.Replace(" ", ""), StringComparison.OrdinalIgnoreCase) > -1
    

    Should probably be:

    file.Name.Replace(" ", "").IndexOf(dfFileWildCard.Replace(" ", ""), StringComparison.OrdinalIgnoreCase) > -1
    

    Notice I’m calling Replace on file.Name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: string[] files = Directory.GetFiles(@C:\Notes, *.txt, SearchOption.TopDirectoryOnly); foreach(string file in
Ok so I have the following code: string numbers = File.ReadAllText(numbers.txt); StringSplitOptions.RemoveEmptyEntries); List<string> List
I'm trying to send a file using ftp. I have the following code: string
I have the following code: std::string cmd = sudo chmod a+x file; int r
I currently have the following code: string user = @DOMAIN\USER; string[] parts = user.Split(new
I have the following code: String curDir = .; File fileObject = new File(curDir);
I have the following C# code: string MyString = <a href=\magnet:?xt=urn:btih:7f3befa467c4cac0787286c87ea264a0606066f5&dn=some.file.name.zip&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%2Ftracker.ccc.de%3A80\ title=\Download this torrent
I have the following code: String website = http://www.somewebsite.com/; Document doc = Jsoup.connect(website).get(); Elements
I have the following code string three() { return three; } void mutate(string& ref)
I have the following code: string acctStatus = account.AccountStatus.ToString(); if (!SettableStatuses().Any(status => status ==

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.