If simple dialog windows to choose the files and present Yes or No kinds of questions would work then the following is pretty quick and easy. Instead of choosing an output file this uses a Save As dialog to input the file name. You could write to a temporary file and then copy to the file named in the Save As dialog when finished.

use strict; use warnings; use Win32::GUI(); use Win32; use Win32::FileOp qw(SaveAsDialog); my $startdir = 'C:\Users'; my $filename = Win32::GUI::GetOpenFileName( -title => 'Select a file' +, -directory => $startdir, -filter => ["Perl scripts (*.pl, *.pm)" => "*.pl;*.pm", "All files +" => "*.*", ],); if ($filename) { my $returnvalue = Win32::MsgBox("Use $filename ?",4,"Use it?"); if ($returnvalue == 6){ Win32::MsgBox("Using $filename as input."); } else{ Win32::MsgBox("Not using $filename as input."); } print "--- $filename\n"; } else { print "\$filename was not chosen by Win32::GUI::GetOpenfilename\n" +; exit; } my %parameters = ( title => "Output file", filters => {'Filter 1' => '*.txt;*.log', 'Filter 2' => '*.dat'}, filename => 'output.txt', ); my $output_file = SaveAsDialog %parameters , "output.txt"; if($output_file){ Win32::MsgBox("Using $output_file as output."); } else{ Win32::MsgBox("No output file chosen."); }

In reply to Re: Best/Fast/Simple way to add a GUI to a batch process by Lotus1
in thread Best/Fast/Simple way to add a GUI to a batch process by vitoco

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.