Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
GeneralC sharp file creation at specified time. Pin
kanswal7717-Oct-14 3:54
kanswal7717-Oct-14 3:54 
GeneralRe: C sharp file creation at specified time. Pin
BillWoodruff17-Oct-14 3:58
professionalBillWoodruff17-Oct-14 3:58 
GeneralRe: C sharp file creation at specified time. Pin
kanswal7717-Oct-14 5:53
kanswal7717-Oct-14 5:53 
GeneralRe: C sharp file creation at specified time. Pin
BillWoodruff17-Oct-14 6:25
professionalBillWoodruff17-Oct-14 6:25 
GeneralRe: C sharp file creation at specified time. Pin
kanswal7717-Oct-14 6:34
kanswal7717-Oct-14 6:34 
GeneralRe: C sharp file creation at specified time. Pin
BillWoodruff17-Oct-14 7:47
professionalBillWoodruff17-Oct-14 7:47 
GeneralRe: C sharp file creation at specified time. Pin
kanswal7718-Oct-14 17:24
kanswal7718-Oct-14 17:24 
GeneralRe: C sharp file creation at specified time. Pin
Nicholas Marty17-Oct-14 4:32
professionalNicholas Marty17-Oct-14 4:32 
There are many ways (and for some you wouldn't even have to use a c# program)

Solution 1
No need for C#. Create a batch file that you run daily at that specified time using the Task Scheduler. (Windows 7 explanation[^], but something like that exists in basically every OS)
Requirements: The OS has to be running during that time.

Batch-File :
BAT
copy /y NUL YourFileName.txt > NUL

Or just write some text into the file. It doesn't actually matter what you write inside your batch script. The Task Scheduler will just execute it.

Solution 2
Again, use the Task Scheduler. Just write your application in c# that outputs something to your text file.
Requirements: The OS has to be running during that time.

Solution 3
Write an Application that is always running. Implement a Timer that periodically checks what time it is. You'll probably need to check if you have already written the file for that day and reset it when you're rolling over to the next day.
Requirements: The OS and your application have to be running during that time.

There are probably many other possibilities depending on what exactly you're trying to do.

Without any information about what you're trying to do, it's basically impossible to recommend you anything. You may get a few ideas from this or you could provide some further details.
GeneralRe: C sharp file creation at specified time. Pin
kanswal7718-Oct-14 17:38
kanswal7718-Oct-14 17:38 
GeneralRe: C sharp file creation at specified time. Pin
Dave Kreskowiak17-Oct-14 4:35
mveDave Kreskowiak17-Oct-14 4:35 
Question[c#]Place objects in tablelayoutpanel cells in specific order Pin
Member 1116046716-Oct-14 22:32
Member 1116046716-Oct-14 22:32 
AnswerRe: [c#]Place objects in tablelayoutpanel cells in specific order Pin
Richard MacCutchan17-Oct-14 0:01
mveRichard MacCutchan17-Oct-14 0:01 
GeneralRe: [c#]Place objects in tablelayoutpanel cells in specific order Pin
Member 1116046717-Oct-14 0:15
Member 1116046717-Oct-14 0:15 
GeneralRe: [c#]Place objects in tablelayoutpanel cells in specific order Pin
Richard MacCutchan17-Oct-14 2:12
mveRichard MacCutchan17-Oct-14 2:12 
GeneralRe: [c#]Place objects in tablelayoutpanel cells in specific order Pin
Member 1116046717-Oct-14 17:32
Member 1116046717-Oct-14 17:32 
GeneralRe: [c#]Place objects in tablelayoutpanel cells in specific order Pin
Richard MacCutchan17-Oct-14 21:10
mveRichard MacCutchan17-Oct-14 21:10 
GeneralRe: [c#]Place objects in tablelayoutpanel cells in specific order Pin
Member 1116046717-Oct-14 22:27
Member 1116046717-Oct-14 22:27 
GeneralRe: [c#]Place objects in tablelayoutpanel cells in specific order Pin
Richard MacCutchan18-Oct-14 4:02
mveRichard MacCutchan18-Oct-14 4:02 
GeneralRe: [c#]Place objects in tablelayoutpanel cells in specific order Pin
BillWoodruff17-Oct-14 21:39
professionalBillWoodruff17-Oct-14 21:39 
GeneralRe: [c#]Place objects in tablelayoutpanel cells in specific order Pin
BillWoodruff17-Oct-14 0:38
professionalBillWoodruff17-Oct-14 0:38 
GeneralRe: [c#]Place objects in tablelayoutpanel cells in specific order Pin
Richard MacCutchan17-Oct-14 2:15
mveRichard MacCutchan17-Oct-14 2:15 
GeneralRe: [c#]Place objects in tablelayoutpanel cells in specific order Pin
BillWoodruff17-Oct-14 2:45
professionalBillWoodruff17-Oct-14 2:45 
GeneralRe: [c#]Place objects in tablelayoutpanel cells in specific order Pin
Richard MacCutchan17-Oct-14 2:56
mveRichard MacCutchan17-Oct-14 2:56 
AnswerRe: [c#]Place objects in tablelayoutpanel cells in specific order Pin
BillWoodruff17-Oct-14 0:25
professionalBillWoodruff17-Oct-14 0:25 
QuestionPlay/Pause/Stop media through ASIO driver using C# Pin
Praveen Raghuvanshi16-Oct-14 18:16
professionalPraveen Raghuvanshi16-Oct-14 18:16 

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.