Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-09-2008, 07:36 AM   PM User | #1
akisame
New to the CF scene

 
Join Date: Sep 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
akisame is an unknown quantity at this point
Run a Command upon an OK Click

Hello Forum,

I am just wondering if anyone here could help me automate a backup scheme which I go through manually now. My PC is a Vista.

I have a whole directory to backup every week. In order for this folder to be copied properly, I have to make sure that the application that uses the directory is closed. Preferably, a pop-up window should prompt the PC user to close the application and, when OK is clicked in the window, the following command initiates.

Code:
xcopy C:\Users\akisame\AppData\Roaming\akiApplication C:\akiBackup /s /i
Is it possible to write up a single batch file to do all this? I am at a loss how to make a pop-up window and use an OK click as a trigger for another command in the language that command prompt understands (sorry for being inprecise but I don't know the name). I am using this cmd language because it is the only language I know that can access the Windows file system.

If there is a niftier language or an application that can do the same thing, I am more than eager to ditch cmd!

Thank you in advance from a programophobe...
akisame is offline   Reply With Quote
Old 09-09-2008, 09:16 AM   PM User | #2
tagnu
Regular Coder

 
Join Date: Nov 2007
Location: 127.0.0.1
Posts: 348
Thanks: 26
Thanked 40 Times in 39 Posts
tagnu will become famous soon enough
I guess, this can be achieved using Microsoft Visual Basic.

An example using Sendkeys

An interesting article from lifehacker.com on data backup.
Point 9. Back up your computer automatically.'
__________________
Blog Charity:Water
WhatisWrongWith.me/tagnu - Send me anonymous feedback.
tagnu is offline   Reply With Quote
Old 09-09-2008, 03:12 PM   PM User | #3
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
Write a vbscript file instead of a batch file, you can still copy your files and you will have access to a bunch of other stuff including message boxes.
__________________
OracleGuy
oracleguy is offline   Reply With Quote
Reply

Bookmarks

Tags
cmd, conditional

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:47 PM.


Advertisement
Log in to turn off these ads.