Solved

batch file copy; user input

Posted on 2013-07-01
8
585 Views
Last Modified: 2013-07-02
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?
0
Comment
Question by:MRGCD-IS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 14

Accepted Solution

by:
John-Charles-Herzberg earned 300 total points
ID: 39290763
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
 
LVL 14

Expert Comment

by:John-Charles-Herzberg
ID: 39290767
This video will show you how to make the UI

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

Thanks
JC
0
 
LVL 43

Assisted Solution

by:Steve Knight
Steve Knight earned 100 total points
ID: 39290961
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
WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

 

Author Comment

by:MRGCD-IS
ID: 39290997
The software doesn't look anything like that Youtube video.  (Or maybe I'm in the wrong place).
0
 
LVL 14

Expert Comment

by:John-Charles-Herzberg
ID: 39291108
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 39291135
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
 
LVL 43

Expert Comment

by:Steve Knight
ID: 39294313
Did you use AutoIt then or want / need more help using batch/VBScript since you only gave a "B"?
0
 

Author Comment

by:MRGCD-IS
ID: 39294446
I continued writing the .bat file.  Then I downloaded a free .bat to .exe converter.  Thank you for your suggestions.
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Determining the an SCCM package name from the Package ID
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question