• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 350
  • 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
  • 4
  • 2
  • 2
2 Solutions
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)
rgb192Author Commented:
when I type
exit <enter>

cmd disappears

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

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

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

And you should be good
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

deepu chandranCommented:

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


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

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

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

now I can run the command by clicking on a file
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

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