a synctext error in a bat file


  1. Posts : 326
    windows 7 home 32 bit, I just changed back from 64 to 32bit
       #1

    a synctext error in a bat file


    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
    Attached Thumbnails Attached Thumbnails a synctext error in a bat file-bat-file.jpg  
      My Computer


  2. Posts : 3,788
    win 8 32 bit
       #2

    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


  3. Posts : 326
    windows 7 home 32 bit, I just changed back from 64 to 32bit
    Thread Starter
       #3

    re: a synctext error in a bat file


    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.

    samuria said:
    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


  4. Posts : 326
    windows 7 home 32 bit, I just changed back from 64 to 32bit
    Thread Starter
       #4

    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


  5. Posts : 326
    windows 7 home 32 bit, I just changed back from 64 to 32bit
    Thread Starter
       #5

    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


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:41.
Find Us