Solved

batch file copy; user input

Posted on 2013-07-01
8
569 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
 

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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

Are your corporate email signatures appalling?

Is it scary how unprofessional your email signatures look? Do users create their own terrible designs and give themselves stupid job titles? You can make this a lot easier for yourself by choosing an email signature management solution from Exclaimer today.

Join & Write a Comment

YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
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…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now