DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: First real program - Probably need help throughout  (Read 5,351 times)

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 247
First real program - Probably need help throughout
« on: May 12, 2008, 09:01 AM »
A task at work would be easier if I wrote a program to handle it, so I'm going to try and write a C# Application. As I'm new I thought I might document my progress here so you can tell me if I'm being noobish with something or I've missed things.

I learn best by trying and then improving, so this should help me.

The overview is that we have a program called Squeeze that converts files into Flash FLV files. We have a filestore on the same server and Squeeze has 'watch folders' that when you put a file in the folder it will automatically convert it.

This program will have to
  • Check that squeeze is running
  • Look in a database or text file to see which files need moving into the watch folder
  • Move files in and out of the watch folders
  • Move some special files into different folders
  • Send resultant files into a network drive

Things that I don't currently know how to do

  • Check that a program is running
  • Check that a network drive exists and works before sending files to it
  • Most unexpected errors

I'll update you as I go along and please chip in if you see a way of helping.
Learning C# - Graham Robinson

Renegade

  • Tell me something you don't know...
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
    • Participated in NANY Challenge Three Times
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Re: First real program - Probably need help throughout
« Reply #1 on: May 13, 2008, 03:45 AM »
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=499885&SiteID=1

http://www.c-sharpcorner.com/UploadFile/scottlysle/FindListProcessesCS09102007024714AM/FindListProcessesCS.aspx

Those will help for the first one of your questions. i.e.: System.Diagnostics.Process.GetProcesses()

Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 247
Re: First real program - Probably need help throughout
« Reply #2 on: May 15, 2008, 10:12 AM »
This all seems to be going remarkably easily. I've been making individual programs to try out all the steps and they seem to be working exactly as they should.

I've got
  • System.IO.File.Copy moving files from folder to folder
  • Timer waiting 10 minutes before checking the watch folders
  • System.Diagnostics.Process.Start starting up squeeze
  • Processes.GetProcesses checking through the open programs to see if my program is already running

Next step is getting the program to check files in and out of a mySQL database. I've done it with a MSSQL database so it shouldn't be too much of a problem. Then I'll just have to put it all together.
Learning C# - Graham Robinson

Original address: https://www.donationcoder.com/forum/index.php?topic=13325.0