batch file copy; user input

I want to create a batch file for a user to click when they need a file copied over.  (I don't want the user to be able to navigate to the directory.)  I want to be able to click a .bat and it says, "Enter the name of the file you wish to copy".  The filename is entered "positive pay with today's date" for example.   Then the file is copied from the spool directory to a specified network share.

Also, I'd like to be able to "lock" the .bat so its contents can't be viewed or edited.  Is this possible?
Josh HindSystems AdminAsked:
Who is Participating?
 
John-Charles-HerzbergConnect With a Mentor Commented:
You can make a script with a free tool call Autoit form www.autoitscript.com and the compile it to a exe so the user can not see or modify the script.  Autoit can also make a UI for the file input.

Thanks
JC
0
 
John-Charles-HerzbergCommented:
This video will show you how to make the UI

http://www.youtube.com/watch?v=US-z1lO_mh8

Thanks
JC
0
 
Steve KnightConnect With a Mentor IT ConsultancyCommented:
Agreed with John there.... if the user can run a batch file or VBScript they can view it.  They can maybe not amend it if you take away all but read rights but can always Save-As somewhere else too.

You can compile batch files too but AutoIt is good for such things.   Give that a try for starters and if you end up wanting a different ways.

Steve
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
Josh HindSystems AdminAuthor Commented:
The software doesn't look anything like that Youtube video.  (Or maybe I'm in the wrong place).
0
 
John-Charles-HerzbergCommented:
0
 
Steve KnightIT ConsultancyCommented:
If you DID want to do it with just batch / VBScript your best bet would be to obscure a little, e.g. you run batch1.cmd which copies batch2.cmd to %temp% then runs it and deletes it or whatever.

You can choose a file with VBScript or batch file using the normal windows "File open" dialog box, or can literally open a text box you can type into.

Steve
0
 
Steve KnightIT ConsultancyCommented:
Did you use AutoIt then or want / need more help using batch/VBScript since you only gave a "B"?
0
 
Josh HindSystems AdminAuthor Commented:
I continued writing the .bat file.  Then I downloaded a free .bat to .exe converter.  Thank you for your suggestions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.