Solved

batch file copy; user input

Posted on 2013-07-01
8
572 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
An article on effective troubleshooting
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

776 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