Thread: Help with this simple program please

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    2

    Help with this simple program please

    I have extensive programming experience in php / C. I am currently trying to code a little app and need help deciding what direction to go. Your help would be greatly appreciated.

    I need a simple app / script for the following purpose:

    I have a directory with multiple files in it, some of which are zips. I need to have the app to go through and look for the zips i specify and extract them to a location that i specify - and then move some of the extracted files to a certain location. I have a FEW different directories that each have different zips in them, so I will have a separate extract / zip list for each directory.

    I considered using a gui to specify: what script to use (what directory), where that dircotry is (mapped drive, etc - path ie. f:\builda).

    I am really looking for the simplest way to do this. I have NO EXPERIENCE using the C++ Borlad 6 GUI, and I am not sure how to interact with it to my scripts yet.

    Either way, what direction would you suggest that I take this? Use a gui created with c++ builder 6, maybe just a script at a command line - not sure here...

    Need some direction here for web only developer, this is new territory for me.

    Thanks
    Jeff

  2. #2
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    simplest? well command line stuff can do most of that but I'm not sure about searching the directory for zips.

    I'm thinking batch file with pkzip and move calls. Anyone know how to search through the directory for zips in a batch?


    A C app could generate the system calls too. So enumerating the directory and making pkzip and move calls with system() function.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    2
    actually - i should have explained better -

    My script will specify:
    Look for file1.zip, extract to: thislocation

    It does not need to find the zips on the fly and extract them.

    How hard would it be to make a front end for this? I know this is a pretty open ended question...

  4. #4
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    ya, it is. front end / interface could be anything. if you haven't done windows programming, it may not be worth it for you to try that. It would be a lot of work just figuring out the basics of Win32. text base is much easier. and all of the real work could be done in the system() call to pkzip anyway. I would say get some little app up and running that asks the two options (zip name and destination) and makes the call to pkzip.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  5. #5
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    Look into WinBatch. WinBatch can automate keystrokes, mouse movements/clicks. Very cool! Easy to learn too. I think you could get your application running in a day or so. It's ~$100 for the interpreter version and ~500 for the compiler version.

    Or, windows comes with Windows Scripting Host (I haven't used it because it can't automate the mouse... at least the version I investageted a couple of years ago couldn't)

    Or, try to find a zip utility that runs from the command line. Then write a DOS batch program that asks for the file name, source, and destination. Umm... I don't know how to use variables in batch files and this stuff is getting hard to find.)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with a very simple program
    By htdefiant in forum C++ Programming
    Replies: 13
    Last Post: 08-14-2007, 01:27 PM
  2. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  3. [Help] Simple Array/Pointer Program
    By sandwater in forum C Programming
    Replies: 3
    Last Post: 03-30-2007, 02:42 PM
  4. simple silly program
    By verbity in forum C Programming
    Replies: 5
    Last Post: 12-19-2006, 06:06 PM
  5. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM