click on a file to run a cmd.exe

Posted on 2013-01-14
Last Modified: 2013-01-16
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
Question by:rgb192
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2

Expert Comment

ID: 38776797
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)

Author Comment

ID: 38776887
when I type
exit <enter>

cmd disappears

and does not return when I type ctrl z

Accepted Solution

the_b1ackfox earned 300 total points
ID: 38777100
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
Industry Leaders: 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!


Expert Comment

by:deepu chandran
ID: 38777687

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

Author Comment

ID: 38778583
I dont understand where to write file

Assisted Solution

by:deepu chandran
deepu chandran earned 200 total points
ID: 38781413

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


Author Comment

ID: 38785477
what is the command I should write and save as a .vbs file

Author Closing Comment

ID: 38785806

now I can run the command by clicking on a file

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
"lblTime is not declared" 3 63
Copying from a network share 3 36
Trouble installing msi file with msiexe.exe 2 48
search by any word in column 5 29
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

737 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