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 --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
Who is Participating?
the_b1ackfoxConnect With a Mentor Commented:
ok, copy all of this into a text file:

cd c:\gyb
gyb --email --backup  

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

And you should be good
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 --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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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 chandranConnect With a Mentor Commented:

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.

All Courses

From novice to tech pro — start learning today.