Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 04, 2015, 07:26:49 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: First real program - Probably need help throughout  (Read 2024 times)

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 245
    • View Profile
    • Mediaguy
    • Donate to Member
First real program - Probably need help throughout
« on: May 12, 2008, 04:01:56 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

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 12,787
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: First real program - Probably need help throughout
« Reply #1 on: May 12, 2008, 10:45:42 PM »
http://forums.micros...=499885&SiteID=1

http://www.c-sharpco...ListProcessesCS.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: 245
    • View Profile
    • Mediaguy
    • Donate to Member
Re: First real program - Probably need help throughout
« Reply #2 on: May 15, 2008, 05:12:36 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