• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 344
  • Last Modified:

click on a file to run a cmd.exe

want to run this command in cmd.exe by clicking on a file
(ideally without using visual studios or visual basic, want to just use simple windows7)

C:\gyb>gyb --email gmail@gmail.com --backup
note, I need to be in c:\gyb folder

another question is run this file every 30 minutes


I think this information is unrelated to question:
this is to back up gmail to windows os
http://code.google.com/p/got-your-back/wiki/GettingStarted
0
rgb192
Asked:
rgb192
  • 4
  • 2
  • 2
2 Solutions
 
the_b1ackfoxCommented:
So turn it into a cmd file:

start->run type in cmd <hit enter>
type in cd\ <hit enter>
then cd\ c:\ (you can add another directory if you would like this elsewhere)
your prompt should look something like this c:\>

Now type in copy con gyb.cmd <hit enter>
cd\ <hit enter>
cd c:\gyb <hit enter>
gyb --email gmail@gmail.com --backup  <hit enter>
exit <hit enter>

now hit control z

you should be back at your command prompt

You should have a file in that directory call gyb.cmd
double clicking on it should run your program (excusing any of my typos)
0
 
rgb192Author Commented:
when I type
exit <enter>

cmd disappears

and does not return when I type ctrl z
0
 
the_b1ackfoxCommented:
ok, copy all of this into a text file:

cd\
cd c:\gyb
gyb --email gmail@gmail.com --backup  
exit


save it as gyb.cmd   (make sure it doesn't save as gyb.cmd.txt)

And you should be good
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
deepu chandranCommented:
Hi,

One more option you have is to Create a VBScript (.vbs) file and Schedule the VBS on Windows Task Schdule to run for every 30 Min

Refer below URLs

http://stackoverflow.com/questions/5467818/execute-dos-command-from-vbscript
http://msdn.microsoft.com/en-us/library/d5fk67ky(v=vs.85).aspx

-- Deepu
0
 
rgb192Author Commented:
I dont understand where to write file
0
 
deepu chandranCommented:
Hi,

Write it on a notepad or wordpad(any Editor is Fine, Sytax highlight is avaialble on Notepad+ and ultaedit). Save the file as .vbs(vb script file) or cmd

--Deepu
0
 
rgb192Author Commented:
what is the command I should write and save as a .vbs file
0
 
rgb192Author Commented:
thanks

now I can run the command by clicking on a file
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now