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

  • Home
  • SEARCH
  • 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 6046135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:12:13+00:00 2026-05-23T07:12:13+00:00

I am writing a little program in C# that scans a folder and opens

  • 0

I am writing a little program in C# that scans a folder and opens the files that have been created after 5.30pm after a button has been pressed on the program. This will also have to search within sub-folders.

I need a couple of solutions to point me in the correct direction as I’m not sure how I would do this.

This is part of a folder watcher program. The problem is when the user goes home the PC is switched off and there are files being created to the directory after 17.30. So I need a way for when the program is restarted in the morning it detects anything created after 17.30 and open them.

    private void button1_Click(object sender, EventArgs e)
    {
        folderBrowser.ShowDialog();

        textBox1.Text = folderBrowser.SelectedPath;
        filewatcher.Path = textBox1.Text;
        Registry.SetValue("HKEY_CURRENT_USER\\SOFTWARE\\COMPANY\\FOLDERWATCHER", "FOLDERPATH", textBox1.Text);
    }

    private void Form1_Load(object sender, EventArgs e)
    {
        String WatchFolder = Registry.GetValue("HKEY_CURRENT_USER\\SOFTWARE\\COMPANY\\FOLDERWATCHER", "FOLDERPATH", "").ToString();

        textBox1.Text = WatchFolder;
        filewatcher.Path = WatchFolder;
    }

    private void Form1_Resize(object sender, EventArgs e)
    {
        if (WindowState == FormWindowState.Minimized)
        {
            ShowInTaskbar = true;
            Hide();
        }
    }

    private void fileSystemWatcher1_Changed(object sender, System.IO.FileSystemEventArgs e)
    {
        if(!e.FullPath.EndsWith("temp.temp"))
        {
            MessageBox.Show("You have a Collection Form: " + e.Name);
            Process.Start("explorer.exe", e.FullPath);
        }
    }

    private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
    {
        Show();
    }
}

This is my complete code above. I would like to use a button to open or show the files created after 17.30.

  • 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-05-23T07:12:13+00:00Added an answer on May 23, 2026 at 7:12 am

    Look at the System.IO namespace, it has everything you need.

    the DirectoryInfo and File classes will do what you want.

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

Sidebar

Related Questions

I've been writing a little program for fun that transfers files over TCP in
I've been writing a little application that will let people upload & download files
I'm writing a little program that basically has a bunch of buttons that when
I'm a total newbie, but I was writing a little program that worked on
I 'm writing a little program that implements pipes like they work in the
Im writing a little python program that goes through an XML file and does
I'm writing a simple little ocaml program that reads an algebraic statement in from
I'm currently writing a little GUI program that does some work and exits afterwards.
I have made a little program in java that accepts a string as a
I'm looking for some information and a little history. I am writing a program

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.