Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Is it Possible?

Hello, I am fairly new to programming but I was wondering how difficult it would be to do this in Delphi:

:call a command prompt
:input a string that executes a CLI (command line interface) EXE
:allows user to input parameters based on what the EXE allows with drop downs and Windows file structure searches
:does the processing in the background with maybe a progress bar
:create a log file with changes made (original vs. changed)
:if EXE creates a backup file (it does), move those files to some other location, and log it, and allow me to view the log file from the application
:and finally, call another EXE from the application to view the changed file for quick verification

I'm fairly confident that calling the Command Prompt may NOT be needed, but this is what I do manually.

This seems complicated to me. But I am sure with enough practice and patience it can be done. I think what I have in mind will keep me motivated enough to follow through until it is finished, but I need some initial guidance to tell me if it's even do-able in Delphi.

Comments

  • zibadianzibadian Posts: 6,349Member
    : Hello, I am fairly new to programming but I was wondering how difficult it would be to do this in Delphi:
    :
    : :call a command prompt
    : :input a string that executes a CLI (command line interface) EXE
    : :allows user to input parameters based on what the EXE allows with drop downs and Windows file structure searches
    : :does the processing in the background with maybe a progress bar
    : :create a log file with changes made (original vs. changed)
    : :if EXE creates a backup file (it does), move those files to some other location, and log it, and allow me to view the log file from the application
    : :and finally, call another EXE from the application to view the changed file for quick verification
    :
    : I'm fairly confident that calling the Command Prompt may NOT be needed, but this is what I do manually.
    :
    : This seems complicated to me. But I am sure with enough practice and patience it can be done. I think what I have in mind will keep me motivated enough to follow through until it is finished, but I need some initial guidance to tell me if it's even do-able in Delphi.
    :
    :
    It appears to be do-able in Delphi, although I'm unfamiliar with several of the steps.
    1: Not necessary I think
    2: Not necessary I think
    3: A simple form with TComboBoxes to make the dropboxes, and an iterative process using the FindFirst(), FindNext(), FindClose() functions and a TSearchRec variable.
    4: A repeat-until loop which updates the position of a TProgressBar and calls Application.ProcessMessages every step of the loop.
    5: Writing of a simple text-file (either by using a TStringList to keep the log in memory until the process is complete, or a pascal-style textfile variable, which is kept open the whole time)
    6: RenameFile() function
    7: ShellExecute() API function in the ShellApi unit

    All these functions, objects and variable types are well described in the Delphi or windows help files.
  • em_dcmem_dcm Posts: 2Member
    [b][red]This message was edited by em_dcm at 2004-9-28 15:19:51[/red][/b][hr]
    Thanks for the reply. I'm going to give it a try, but I haven't even bought my programming tool of choice yet and I guess this is why I am asking.

    Do you think Delphi is the best choice for something like this?

    Also, will the personal edition of Delphi suffice?

    Thanks


  • zibadianzibadian Posts: 6,349Member
    : [b][red]This message was edited by em_dcm at 2004-9-28 15:19:51[/red][/b][hr]
    : Thanks for the reply. I'm going to give it a try, but I haven't even bought my programming tool of choice yet and I guess this is why I am asking.
    :
    : Do you think Delphi is the best choice for something like this?
    :
    : Also, will the personal edition of Delphi suffice?
    :
    : Thanks
    :
    :
    :
    This kind of thing can be done in any generic language. I wouldn't want to write it in Fortran, but Basic, Delphi, C (any variant), Pascal all can be used equally well. I'm not sure about Java, becuase I have no familiarity with that language.
    As for which edition you need, that's for you to decide. This problem can be programmed in any edition. But perhaps later problems require an more advanced edition. You also need to consider your budget for the programming language of your choice.
Sign In or Register to comment.