Results 1 to 11 of 11

Thread: DOS commands

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Member Phatose's Avatar
    Join Date
    Dec 2003
    Location
    PA, USA
    Posts
    591

    Default Re: DOS commands

    The obvious suspect on lines 2 & 3 is .\bi. I don't see any reference in the existing batch file to creating such a subdirectory. Where is the .\bi coming from, exactly? Unless the subdirectory \bi already exists in the directory you're running the batch file from, you'll have problems.

    Neither lines 1 or 4 would have problems if you're in the incorrect place - it's just removing a directory it created. For example:

    Your installer creates C:\mymod\bi
    Your batch file runs, but runs from C:\

    first line makes C:\ci
    second line looks for c:\bi which doesn't exist, so you get invalid path.
    third line looks for c:\bi\ci, which also doesn't exist, and you get an error.
    fourth line removes C:\ci, which does exist via line one.



    Let me guess - your installer creates the \bi subfolder, and you want to create \ci via the batch, not as a subfolder of \bi\, but as a sibling to it. But since your installer puts the batch file in that \bi directory, it's being run from that folder, so

    first line: makes a subdirectory in current directory named ci. You're IN bi, so you make bi\ci
    second line looks for \bi\bi, which doesn't exist
    third line looks for \bi\bi\ci, which also doesn't exist.
    fourth line removes bi\ci


    Solution: Insert a new line before all others: cd..
    Alternative solution: Move the batch file so it's in the same directory as the bi subfolder, instead of being inside the bi subfolder.
    that will move you one step up the directory tree, so you'll be where you should be.


    Thing to remember here is the . refers to the current directory, which will be wherever your batch file is run from.
    Last edited by Phatose; 01-28-2007 at 04:10.

  2. #2
    Cynic Senior Member sapi's Avatar
    Join Date
    Oct 2004
    Location
    Brisbane
    Posts
    4,970

    Default Re: DOS commands

    Phatose makes a good point, but i'd also question your usage of 'copy .\bi\* - i don't think the asterix is needed (as you want to copy the folder, not the files)
    From wise men, O Lord, protect us -anon
    The death of one man is a tragedy; the death of millions, a statistic -Stalin
    We can categorically state that we have not released man-eating badgers into the area -UK military spokesman Major Mike Shearer

  3. #3
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: DOS commands

    The batch file is in the correct place and the bi folder already exists. If ci is created (which it is) then it proves the path correct, an yet on those other lines it is reporting an invalid path.

    Very strange.


    The asterisk was merely a variation test, along with no asterisk and *.* etc.
    "One of the most sophisticated Total War mods ever developed..."

  4. #4
    Member Member Phatose's Avatar
    Join Date
    Dec 2003
    Location
    PA, USA
    Posts
    591

    Default Re: DOS commands

    You've seen the \ci actually created in the appropriate directory?


    Oh wait. I know what the problem is.

    Use xcopy .\ci, not .\ci\
    Last edited by Phatose; 01-28-2007 at 18:10.

  5. #5
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: DOS commands

    Yes - the install directory is set in the pathway by the installer itself (for the bat file). ci folder is created correctly.
    "One of the most sophisticated Total War mods ever developed..."

  6. #6
    Member Member Phatose's Avatar
    Join Date
    Dec 2003
    Location
    PA, USA
    Posts
    591

    Default Re: DOS commands

    See above post. The final \ in the xcopy path is the problem - just tested. Must be interpreting that as a subdirectory reference to an unnamed subdirectory.

  7. #7
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: DOS commands

    Phatose,

    That did it! Gah, I am so rusty!

    Big thank you.

    I can now move on to pinning down the rest of it!
    "One of the most sophisticated Total War mods ever developed..."

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO