Author Topic: Batch processing files example [generic example]  (Read 2617 times)

0 Members and 1 Guest are viewing this topic.

exmachina

  • Guest
Batch processing files example [generic example]
« on: September 30, 2013, 06:44:32 AM »
It is only an (C#) example of how to process a lot of files using the Backgroundworker component.
Uses the Windows API to enumerate files because for this purpose I think it works better than .NET functions. Also shows you how to cancel the process correctly if the form is closed, and some things more.

It is a an WinForms application , but the Backgroundworker component can also be used in AutoCAD with a modal form.
The application is just one example, does not alter any file.

I'm not a programmer and I've never read any book about programming, but I think it is a good example



The project must be compiled before opening the main form. Usually, if you see this icon you must compile before opening a form to avoid errors

« Last Edit: September 30, 2013, 08:36:30 AM by jar »

exmachina

  • Guest
Re: Batch processing files example [generic example]
« Reply #1 on: September 30, 2013, 08:46:34 AM »
Updated
I apologize. The code contains an error, I forgot to add these lines inside worker.cs.


This does not affect the execution, but the application does not show the actual status in the GUI.



exmachina

  • Guest
Re: Batch processing files example [generic example]
« Reply #2 on: October 05, 2013, 04:42:34 PM »
A more complex example
Files can be filtered by type, size or date (take a look at  DateTimeInterval.cs)



I have reported that some forum "users" do not like my posts:
Perfect, but be coherent: In this case, do not read my posts and do not use my code.
« Last Edit: October 05, 2013, 04:45:37 PM by jar »

WILL HATCH

  • Bull Frog
  • Posts: 450
Re: Batch processing files example [generic example]
« Reply #3 on: October 05, 2013, 10:39:12 PM »
I have reported that some forum "users" do not like my posts:
Perfect, but be coherent: In this case, do not read my posts and do not use my code.

Thumbs up. This material is great for anybody wanting to start with this topic

exmachina

  • Guest
Re: Batch processing files example [generic example]
« Reply #4 on: October 05, 2013, 11:07:19 PM »
This material is great for anybody wanting to start with this topic

...start with this topic ?
Can you share some example like this?

Is a rhetorical question, I know the answer

Thanks for your "interest".
« Last Edit: October 06, 2013, 05:41:33 AM by jar »

huiz

  • Swamp Rat
  • Posts: 917
  • Certified Prof C3D
Re: Batch processing files example [generic example]
« Reply #5 on: October 06, 2013, 04:57:28 AM »
Do I miss something here? I've read your code and next week I'll have a closer look to see if I can implement this in one of my projects. It is really interesting and it might help me with some problems.

Why do some users do not like your posts? I've not read all topics lately so I missed something?
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

exmachina

  • Guest
Re: Batch processing files example [generic example]
« Reply #6 on: October 06, 2013, 05:20:06 AM »
Do I miss something here? I've read your code and next week I'll have a closer look to see if I can implement this in one of my projects. It is really interesting and it might help me with some problems.

Why do some users do not like your posts? I've not read all topics lately so I missed something?

Do not worry about that, It's not your problem, nor my problem
I'm glad that my code has been useful to you.

romulo

  • Mosquito
  • Posts: 20
Re: Batch processing files example [generic example]
« Reply #7 on: October 07, 2013, 04:26:34 PM »
jar, thank you for your post!