Bat file problem. Windows Cannot Access the Specified Adress or File

Page 2 of 2 FirstFirst 12

  1. Posts : 5,478
    2004
       #11

    I recreated this problem. I downloaded your bat and after clicking on "more info" warning from defender your bat ran fine.

    What is trying to do with move ..\DME_AUM.pack .\Packs\DME_AUM.pack is move a file called "DME_AUM.pack" from one level lower in your directory tree to a folder called "Packs" in the directory where your bat file is running.

    I'm assuming you have it in the right place so I make a directory C:\Temp, another called C:\Temp\Packs and put the file in root of C:

    It works fine in admin cmd prompt:
    PHP Code:
    PS C:\Tempcmd
    Microsoft Windows 
    [Version 10.0.16299.64]
    (
    c2017 Microsoft CorporationAll rights reserved.

    C:\Temp>move ..\DME_AUM.pack .\Packs\DME_AUM.pack
            1 file
    (smoved
    If I move the file back and change your bat to add a "pause" like this
    PHP Code:
    @echo off
    move 
    ..\DME_AUM.pack .\Packs\DME_AUM.pack
    pause
    exit 
    then I get the same error as you:
    PHP Code:
    The system cannot find the file specified.
    Press any key to continue . . . 

    You could just put ext:pack in the search field in Windows File Explorer and move them manually but it is interesting the bat file doesn't find the file even when run as administrator.

    Can I ask are these files in the root of some drive? Like C:\ or D:\ ?
      My Computer


  2. Posts : 8
    Windows 10
    Thread Starter
       #12

    That one is part of Empire Total War Darthmod in H drive. Adress is H:\Steam\steamapps\common\Empire Total War\data\DME\Packs
    The other ones: For instance, this one is very simple on the c drive.
    C:\Program Files (x86)\Steam\SteamApps\common\Sudden Strike 2 Gold

    code\release\game_exe.exe

    I used bat to exe converter and it worked. I reckon I could launch that in summer and Win 10 was installed in spring.
      My Computer


  3. Posts : 8
    Windows 10
    Thread Starter
       #13

    Maybe useful info, I noticded steam folder in H drive is read-only and my user account has no full access. When tried to apply I get failed to enumerate objects in the container in that directory where bat files are.
      My Computer


  4. Posts : 5,478
    2004
       #14

    I don't think it is anything to do with Steam as it failed for me on a temp folder on the C drive.

    I don't think it is anything to do with using Home version either (I have Pro) or AV (as after unblocking the thing it failed just the same and I use defender).

    Either it is a bug in Windows or the bat script is wrong somehow. Considering it works if you copy/paste into cmd window it looks like a bug to me but I'm not a .bat expert.

    I'll keep looking but perhaps someone else will have a clue.

    As for the "enumerate objects" thing you need to take ownership first. I don't think it is relevant to your problem but try this from an admin cmd prompt. Leave the "%USERDOMAIN%\%USERNAME%" exactly as it is - don't put your name in - it will be replaced automatically by the cmd shell.

    This bit of code takes ownership of "H:\Steam" directory and then grants you full authority.

    PHP Code:
    takeown  /f  "H:\Steam" /r
    icacls       
    "H:\Steam" /grant "%USERDOMAIN%\%USERNAME%":(F) /
      My Computer


  5. Posts : 8
    Windows 10
    Thread Starter
       #15

    I just had a very long Windows update. After this, all bat files launch without this error. Seems there was some general bug in the system and now its corrected. Case resolved.
      My Computer


 

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

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




Windows 10 Forums