Hi - I gave what you said an attempt but it was a little confusing and I dont think i did it right because nothing happened! It was perhaps a little over my level of computer understanding. Is there a simpler way? The file type is .mdc and gets used with a program called Cognos-Power Play. The file is copied every Monday morning from C:/ and transferred to all the subfolders within a folder called "cognos reports". Does this help at all?
So the original file is C:\<yourfilename>.mdc
and you need to copy it to all the subfolders of C:\cognos reports
all of which are on your computer, is that right?
You need to know the names of these subfolders and specify them in your batch file which would now look more like this: (I have made some changes to accomodate the long folder-name and the fact that these files probably already exist so you will be overwriting them)
REM syntax = multic_<filename.ext>
REM this batch file copies the file
REM specified in the command line
REM to three pre-existing directories
IF "%1" == "" GOTO NOFILE
COPY C:\%1 /Y "C:\Cognos Reports\FOLDER1"
COPY C:\%1 /Y "C:\Cognos Reports\FOLDER2"
COPY C:\%1 /Y "C:\Cognos Reports\FOLDER3"
echo "*** Error - No file specified ****"
Cut and paste this text into a new notepad document, then edit it to have the correct folder names etc. When you finish editing save the file with a ".BAT" ending. For the sake of simplicity save it as C:\MULTIC.BAT
(lower case is OK as well).
When you want to use the batch file open a command prompt window by clicking Start>Run and type cmd
In the black window that opens type CD \
to change the prompt to C:\>
Then type MULTIC <yourfilename>.mdc
You should see a message that says "(1) Files copied" for every subdirectory you put in the batch file.
Then type exit
to close your command window and go back to XP.
Give that a go.
Edited by Rimmer, 31 October 2005 - 11:55 PM.