Solved a synctext error in a bat file

reble

New member
Member
VIP
Local time
4:59 PM
Messages
326
Location
Kennewick, Wa
I am trying to make a bat file to put on a cd that when the cd is put in and the bat file is run, it will make a directory on the hard drive then copy the DOS game from the cd and past the game to the directory that was made on the hard drive. I am making this cd for a friend and it is a new learning experience for me.
I got the bat file partly working. I am having a sync text error in the copy cmd line that I can't figure out. I have a few read/write DVD's. I am using the 1 of the read/write DVD's as a test bead instead of using up all my blank DVD's and CD's until I get all the bugs out of the bat file. The DVD is formated. Bellow is the bat file as it stands now and a screen capture of the DOS cmd box. I would be very grateful if someone can help me work out the bugs. The dir names in the copy line are for test purposes only. Once the bat file is working right I will put in the real dir's. The test dir names are so I don't screw up my hard drive during testing.


@echo off
echo WELCOME TO WOLF3D COPYER.
echo This BAT file will make the directory and copy the game to the HD.
pause &rem [this pause is here because the echo lines above won't show when the bat file runs without the pause]
mkdir C:\dgames\dgames\wolf3d-
cd /d "%~dp0"
cls
echo Your %~d0 drive.
cd %~d0
dir
cd temp &rem [the bat file works fine to this point]
COPY "Cd %~d0\temp\test file.doc" "C:\dgames\dgames"
rem [I am having a sync error in the copy line]

pause &rem [the pause is here to keep the dos cmd window open to take a screen capture picture]



Steve
 

Attachments

  • bat file.jpg
    bat file.jpg
    58.7 KB · Views: 15

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell Inspiron 3541
OS
windows 7 home 32 bit, I just changed back from 64 to 32bit
CPU
amc a6-6310, radon r4 graphics 1800mhz with 4 cores
Memory
6.8gb
Graphics Card(s)
not sure off hand
Sound Card
not shure off hand
Monitor(s) Displays
built in lcd
Screen Resolution
1366 x 768
Hard Drives
1 500gb sata internal HDD and 1 250 gb's sata HDD in a USB external USB case.
Keyboard
Wifi with attached wifi mouse
Internet Speed
don't know
Antivirus
Zone Alarm
Browser
Firefox
Other Info
The gateway laptop model MD2614U died because a voltage regulator on the motherboard went poof. The Gateway laptop has been scraped.
A lot of fafing about use built in robocopy then you just need
Robocopy y: c:\
That will create folders on c copy all the folders over job done in one line. Robocopy is built into Windows but you could put the file on DVD to be sure. You can download a free GUI for robocopy to write script for you
 

My Computer

Computer type
PC/Desktop
OS
win 8 32 bit
What is "fafing"? I hear about all this caned prog's like "robocopy" and "quick menu builder". I need the starightfoward batch copy of the cmd chain of events for the copy cmd.

A lot of fafing about use built in robocopy then you just need
Robocopy y: c:\
That will create folders on c copy all the folders over job done in one line. Robocopy is built into Windows but you could put the file on DVD to be sure. You can download a free GUI for robocopy to write script for you
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell Inspiron 3541
OS
windows 7 home 32 bit, I just changed back from 64 to 32bit
CPU
amc a6-6310, radon r4 graphics 1800mhz with 4 cores
Memory
6.8gb
Graphics Card(s)
not sure off hand
Sound Card
not shure off hand
Monitor(s) Displays
built in lcd
Screen Resolution
1366 x 768
Hard Drives
1 500gb sata internal HDD and 1 250 gb's sata HDD in a USB external USB case.
Keyboard
Wifi with attached wifi mouse
Internet Speed
don't know
Antivirus
Zone Alarm
Browser
Firefox
Other Info
The gateway laptop model MD2614U died because a voltage regulator on the motherboard went poof. The Gateway laptop has been scraped.
I finely figured out the correct syntax for the copy line. It now works 100%. [COPY "test file.doc" "C:\dgames\dgames"] without using fancy prog's like Robocopy.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell Inspiron 3541
OS
windows 7 home 32 bit, I just changed back from 64 to 32bit
CPU
amc a6-6310, radon r4 graphics 1800mhz with 4 cores
Memory
6.8gb
Graphics Card(s)
not sure off hand
Sound Card
not shure off hand
Monitor(s) Displays
built in lcd
Screen Resolution
1366 x 768
Hard Drives
1 500gb sata internal HDD and 1 250 gb's sata HDD in a USB external USB case.
Keyboard
Wifi with attached wifi mouse
Internet Speed
don't know
Antivirus
Zone Alarm
Browser
Firefox
Other Info
The gateway laptop model MD2614U died because a voltage regulator on the motherboard went poof. The Gateway laptop has been scraped.
After about 14 hours of work I finely got the last syntax bug out of the batch file. The last bug was the xcopy string to copy the game it self and all the games sub directorys from the cd to the hard drive. The final string is [XCOPY "\games*" "C:\dgames\dgames" /e]. I went through many hours of looking at the xcopy cmd syntax switchs at lifewire.com/xcopy-command-2618103. Now that is done I will do the main menu and burn the cd after a few hours of sleep. It was real learning experience. Thats how I learn new things, hands on and getting my hands durty.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell Inspiron 3541
OS
windows 7 home 32 bit, I just changed back from 64 to 32bit
CPU
amc a6-6310, radon r4 graphics 1800mhz with 4 cores
Memory
6.8gb
Graphics Card(s)
not sure off hand
Sound Card
not shure off hand
Monitor(s) Displays
built in lcd
Screen Resolution
1366 x 768
Hard Drives
1 500gb sata internal HDD and 1 250 gb's sata HDD in a USB external USB case.
Keyboard
Wifi with attached wifi mouse
Internet Speed
don't know
Antivirus
Zone Alarm
Browser
Firefox
Other Info
The gateway laptop model MD2614U died because a voltage regulator on the motherboard went poof. The Gateway laptop has been scraped.
Back
Top