Computing.Net > Forums > Programming > Windows Batch + C++ to copy files?

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Windows Batch + C++ to copy files?

Reply to Message Icon

Original Message
Name: DusK
Date: April 21, 2003 at 18:51:26 Pacific
Subject: Windows Batch + C++ to copy files?
OS: Win XP
CPU/Ram: P4 1.6ghz 768mb pc133
Comment:

Ok, I am a comp sci major and I do work study for the admin computing office on campus. Normally I write database reports on our Unix server. My boss has recently challenged me with this new project. Many of the users Windows machines will be getting an update on their software to the server and apparently there is a file that will be located in an uncertain # of places in their install dir that will need to be overwritten with our offices custom version of the file. The file along with my program will be sitting on the upgrade CD, and it will be carried to plenty of Windows systems from ver. 95 up to XP. So I was told to write my program in Windows Batch to select the CDROM dir and the installation dir and then copy the file on the CD over the files in the installation dir. I found a nice little app to help me out here called WizardApp: http://wizapp.sourceforge.net . In order to find the locations of the file on the users machine I am using the command: 'dir /s /b c:\installdir\myfile' which outputs all the locations below that dir with the file. I have redirected the output into a simple text file and was attempting to write a C++ program to strip each line out of my text file and either send them as seperate variables back into the batch file or do the copying in the C++ program. Needless to say I am stuck! I learned C++ last school year and it is a bit rusty for me, and I am unsure of how possible it is to get the info back into the batch program or if there may be an easier way to do all of this in the batch program or c++ program. Any help would be awesome! Thanks


Report Offensive Message For Removal








Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home








Do you have your own blog?

Yes
No
I did before
I will soon


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge
Poll History




Data Recovery Software