Hi all
I am developing a small windows Service application which mointer a files in a specific folder and add their names to a queue by using a watch file class to add files to the queue.
This part is done.
Then in a windows Service I should move these files to another location (folder,DVD,... ).
How can I do this task ?
I am using now
and I feel it is not the optimal way.
Can any one suggest best than the above code
thanks
Khayralla
I am developing a small windows Service application which mointer a files in a specific folder and add their names to a queue by using a watch file class to add files to the queue.
This part is done.
Then in a windows Service I should move these files to another location (folder,DVD,... ).
How can I do this task ?
I am using now
Code:
protected override void OnStart(string[] args) { do { if (queue.Count > 0) { itemFile nextFile = (itemFile ) queue.Dequeue(); System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(ProcessRequest)); t.Start(nextFile as object ); } } } while (true); ..
Can any one suggest best than the above code
thanks
Khayralla
Comment