
writing a macro to copy files to new folder
Posted 29 July 2004 - 02:00
My next dilemna is how to write a macro to copy files from multiple folders to a new folder on the harddrive....any suggestions?
Thanks
Posted 29 July 2004 - 04:39
-Stein Åsmul
Posted 29 July 2004 - 05:27
Posted 29 July 2004 - 05:52
Here's what I know so far ;-)
cmd
copy c:\test\disk1\*.* g:
that works
now I have to do the same for each of the following:
c:\test\disk2\*.* g:
c:\test\disk3\*.* g:
c:\test\disk4\*.* g:
c:\test\disk5\*.* g:
c:\test\disk6\*.* g:
is that what the batch file will do?
then there are a couple of single files that need to also be copied. The next step is trickier, I have 36 individual folders that each have one client specific file that needs to be copied onto the cd. Each one is in a specific client named folder, can i get it to prompt me to put in client1 cd, then client2 cd, etc?
I learning...thanks
Posted 29 July 2004 - 06:32
Posted 29 July 2004 - 07:09
To show file extensions in XP, open Windows Explorer. Tools : Folder Options... : View : Uncheck "Hide extension for known file types".
-Stein Åsmul
Posted 29 July 2004 - 13:30
Just to clear my confusion, a batch file is first written in notepad and saved as a .bat file ? And should it be in aspecific location on my harddrive or is any directory fine?
Posted 29 July 2004 - 14:46

Edited by Glytzhkof, 29 July 2004 - 14:47.
-Stein Åsmul
Posted 29 July 2004 - 21:29
@ECHO OFF
:LOOP
echo MPT Full install file transfer from Disk1-Disk6
md D:\makecd\setup\FULL
copy setup\disk1\*.* D:\makecd\setup\FULL
copy setup\disk2\*.* D:\makecd\setup\FULL
copy setup\disk3\*.* D:\makecd\setup\FULL
copy setup\disk4\*.* D:\makecd\setup\FULL
copy setup\disk5\*.* D:\makecd\setup\FULL
copy setup\disk6\*.* D:\makecd\setup\FULL
echo
echo copy autorun.inf
copy setup\autorun.inf D:\makecd\setup\FULL
echo
echo delete setup.inf
del setup\full\setup.inf
echo
echo MPT Full install
echo Insert CD labeled CD FULL
pause
label G: MPT FULL INSTALL
copy D:\makecd\setup\FULL\*.* G:
echo
if not exist setup\disk7.* goto NOCD
:NOCD
echo Hit CTR-C if no more CDs are needed
pause
goto :LOOP
Posted 30 July 2004 - 03:22
I'm getting better but have a couple of questions you might be able to answer.
I will describe what I need to do in layman's terms:
assumptions:
my CD drive is G
I know what I'm doing - hee hee
I have the following directory on my D: drive
d:\sites\client1
d:\sites\client2
d:\sites\client3
d:\sites\client4
etc
each client folder contains the same named file[diferent contents specific to that client]
I would like to write a batch file that will echo "insert CD for Client1"
then go to the d:\sites\client1 folder and copy fileX to the CD and overwrite if that file is found on the CD
eject CD
then automatically scroll to the next folder [client2] and echo "insert CD for Client2"
then go to the d:\sites\client1 folder and copy fileX to the CD and overwrite if that file is found on the CD
eject CD
then the same for Client3, client4, etc..
any ideas on the commands that will look at the folder name and prompt for that name and then copy to cd, eject cd and auto scroll to next folder in the directory tree and prompt for that name and then copy to cd, eject cd and auto scroll to next folder in the directory tree etc...
Thanks for any and all ideas...please remember i am a beginner ;-)
Considering the time, I understand you're probably eating some "shrimp on the barbee" -- just kidding
Thanks again
Posted 30 July 2004 - 08:06
-Stein Åsmul
Posted 30 July 2004 - 13:18
I am able to write directly to the CD because it is a CD-RW and I go through the 25minute process of formatting it. Then it can be used just like a floppy. So I just format several disks beforehand.
Thanks again.
Posted 30 July 2004 - 13:34
-Stein Åsmul
Posted 30 July 2004 - 15:30
ps: what is an ISO image?
Have a great day!!
Posted 31 July 2004 - 13:53
I have limited experience with batch files, but you should be able to use the pause command to suspend batch file processing after a CD has been created. You can also launch commands with start /wait [command] or cmd.exe /c [command] may also work. You would then need to press a key to continue processing after the CD has been inserted.
Edited by Glytzhkof, 31 July 2004 - 13:54.
-Stein Åsmul