Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
DOS/Other
Tag Cloud
access acer asus bios bsod computer crash desktop dns driver drivers error ethernet excel freeze gaming graphics hard drive hardware hdmi internet laptop malware memory monitor motherboard network printer problem ram registry repair router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > DOS/Other >
Batch File Help ... XCOPY?

Reply  
Thread Tools
c2kelly's Avatar
Junior Member with 2 posts.
 
Join Date: Aug 2009
24-Aug-2009, 05:35 AM #1
Batch File Help ... XCOPY?
I'm new to the batch file world and am in desperate help for something I'm sure is very basic.

I need to copy a .txt file into the folder that contains my DOS program (called wavgen) and rename it accelerogram.dat so that wavgen can read it. The program has to be started, and an input of 0.05 has to be entered. Then the output file compatible.dat needs to be copied as/ saved as a different name. I'll be repeating this code, so if I need 5 runs of the program, there will be five repeats of this, and the xcopy should basically dump input into the accelerogram.dat file and save the output from the compatible.dat file into a separate file with a new name.

ERASE accelerogram.dat
XCOPY A1.dat to accelerogram.dat (? confused how to code this)
START wavgen
Somehow prompt an input of 0.05
XCOPY compatible.dat to C1.dat (? again confused)

Any help with any portion of this would be greatly appreciated. Thanks!!

CK
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
24-Aug-2009, 04:53 PM #2
In theory really no need to use xcopy in this instance but that is just me.
Why prompt for the input of 0.05 if you know it should be 0.05.

Code:
del "c:\some folder\accelerogram.dat"
copy "c:\some folder\a1.dat" "c:\some folder2\accelerogram.dat"
start "" "c:\program files\wavgen\wavgen.exe"
set /p _input=Enter your value:
del "c:\some folder\c1.dat"
copy "c:\some folder\compatible.dat" "c:\some folder2\c1.dat"
c2kelly's Avatar
Junior Member with 2 posts.
 
Join Date: Aug 2009
25-Aug-2009, 03:08 AM #3
Thank you so much! Yeah, looks painfully basic =)

I actually need the program to read 0.05 and press enter for the program to run on it's own. I've been reading about coding keystrokes, but it seems to me like there has to be an easier way.

I've tried a few things, but nothing's worked yet.
scrfix's Avatar
Computer Specs
Member with 337 posts.
 
Join Date: May 2009
Experience: Computer Repair Expert
25-Aug-2009, 03:16 AM #4
For your keystrokes, I am not sure about coding that in a batch however you can code it in AUTOIT, compile it into an EXE and call that from a batch file. It is extremely easy from what I was reading.
Check out the following forum post about it:
http://www.tek-tips.com/viewthread.c...1059299&page=4
__________________
Wayne Leiser, Spectacular Computer Repair Computer Repair, Computer Services
World Famous Gift Baskets: Gift Baskets
Resources LLC: Water Treatment Coagulation, Water Recycling
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
25-Aug-2009, 09:48 AM #5
You would need to SendKeys in a Vbscript.
Is this input to your wavgen program?
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
25-Aug-2009, 10:17 AM #6
Scancode is another option. It is a 3rd party utility you would have to put on your computer though.
http://www.simtel.net/free/Keyboard-...0zip/3741.html
Reply

Tags
batch, dos, wavgen, xcopy

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 08:47 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.