Solved

batch file copy; user input

Posted on 2013-07-01
8
576 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
  • 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
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 

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

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

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

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

820 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