Windows 10: Calling Batch File People Solved

Page 1 of 3 123 LastLast
  1.    18 Jul 2016 #1

    Calling Batch File People


    For years on XP, Win7, Win8 & 8.1 I have used this batch file method to transfer pictures from a card reader to a (the same) directory on my computer. After upgrading to Win10 it no longer works.

    When I try to run it I get this:

    C:\Windows>dir J:\DCIM\198___07 1>nul
    C:\Windows>if errorlevel 1 goto :ck39Cannonempty
    C:\Windows>xCopy J:\DCIM\198___07\*.* /D /C
    J:\DCIM\198___07\IMG_99.JPG
    Access denied
    0 File(s) copied

    C:\Windows>pause
    I see what's wrong but don't know how to fix it. The entries in the batch file look exactly as the stuff following the right angle bracket in the text quoted above. Suddenly it has begun running as though the batch file was in the Windows directory (folder if you prefer). It isn't. It's still in my age old Card Transfer directory on a different internal drive.

    Why does Win10 think a batch file actually running in an entirely independent directory on a different drive is running in the Windows directory? And, how can I make it normal again?
    Last edited by iamjim; 18 Jul 2016 at 19:43.
      My ComputerSystem Spec

  2.    18 Jul 2016 #2

    What does your batch file look like?
      My ComputerSystem Spec

  3.    18 Jul 2016 #3

    iamjim said: View Post
    For years on XP, Win7, Win8 & 8.1 I have used this batch file method to transfer pictures from a card reader to a (the same) directory on my computer. After upgrading to Win10 it no longer works.

    When I try to run it I get this:



    I see what's wrong but don't know how to fix it. The entries in the batch file look exactly as the stuff following the right angle bracket in the text quoted above. Suddenly it has begun running as though the batch file was in the Windows directory (folder if you prefer). It isn't. It's still in my age old Card Transfer directory on a different internal drive.

    Why does Win10 think a batch file actually running in an entirely independent directory on a different drive is running in the Windows directory? And, how can I make it normal again?
    Well I see the xcopy command syntax looks all wrong for starters. it should look something like

    xcopy C:\somefolder E:\backupfolder /D /E /C /R /H /I /K /Y

    Also that command would try and copy all files to one file

    J:\DCIM\198___07\*.* to J:\DCIM\198___07\IMG_99.JPG

    just does not look right.
      My ComputerSystem Spec


  4. Posts : 5,101
    Windows 10 Pro X64 15063.483
       18 Jul 2016 #4

    Put a cd %userprofile% at the beginning of the batch file maybe?
      My ComputersSystem Spec

  5.    18 Jul 2016 #5

    spunk said: View Post
    What does your batch file look like?
    dir J:\DCIM\198___07 > nul
    if errorlevel 1 goto :ck39Cannonempty
    xCopy J:\DCIM\198___07\*.* /D /C
    :ck39Cannonempty
    The first two lines interrogate the card to see if there's anything in the folder. If not, it jumps to the last line and quits.
    If there are files in the folder the third line copies them to the current directory.

    For some bizarre reason it thinks the current directory is Windows. Whaaaat?
    Last edited by iamjim; 18 Jul 2016 at 19:53.
      My ComputerSystem Spec

  6.    18 Jul 2016 #6

    Ztruker said: View Post
    Put a cd %userprofile% at the beginning of the batch file maybe?
    I can add a drive change and
    a CD to the target directory at the beginning of every batch file

    But, I have many batch files and so I would like to get it working right and avoid all that work
    Last edited by iamjim; 18 Jul 2016 at 19:54.
      My ComputerSystem Spec


  7. Posts : 5,101
    Windows 10 Pro X64 15063.483
       18 Jul 2016 #7

    Tjis line, as said above, makes no sense:

    C:\Windows>xCopy J:\DCIM\198___07\*.* /D /C J:\DCIM\198___07\IMG_99.JPG

    As I read it, it says copy all files from the 198_07 directory (folder) to the same folder and call it IMG_99.JPG. If it worked, all files would end up as a single file.

    I doubt that is what you really want to do.

    I suspect the 2nd part should read something like: x:\DCIM\198___07\ where x: is the drive you want to copy to and \DCIM\198___07\ is the directory (folder) you want to copy them to on the x: drive.



    Can you explain in words exactly what you are trying to accomplish. Include drive and folder paths please.
      My ComputersSystem Spec

  8.    18 Jul 2016 #8

    Perhaps you missed my post second before yours where I show and explain the batch file commands

    Incidentally there is no such line as C:\Windows>xCopy J:\DCIM\198___07\*.* /D /C J:\DCIM\198___07\IMG_99.JPG in the batch file.
      My ComputerSystem Spec

  9.    18 Jul 2016 #9

    Ztruker said: View Post
    Tjis line, as said above, makes no sense:

    C:\Windows>xCopy J:\DCIM\198___07\*.* /D /C J:\DCIM\198___07\IMG_99.JPG
    Where did you see this line???

    The content of the OP's batch file is posted above. There's no such line there. And the batch file looks fine.
      My ComputerSystem Spec

  10.    18 Jul 2016 #10

    iamjim said: View Post
    Why does Win10 think a batch file actually running in an entirely independent directory on a different drive is running in the Windows directory? And, how can I make it normal again?
    So, how do you invoke your batch file? Shortcut? Manually from command prompt? Some other way?
      My ComputerSystem Spec


 
Page 1 of 3 123 LastLast

Related Threads
Hi there forum, how do you change the Visual effects using a batch file or registry file. Thanks, Edward.
Hi! I would like to let a user type in things with spaces in set /p. This is the code I currently have that does not work: :newdoc2 cls echo What do you want to say? set saynew=%randomnum% set /p saynew= if %saynew% == %randomnum% goto...
Can't download batch file in General Support
Can't download batch file "10services_default.bat" to solve windows 10 start menu problem.
Solved Writhing Batch File in General Support
Here is my batch file but it will not delete the file? Must be missing something :( del "C:\Users\Larry\AppData\Local\TractorParts\tractor\ConfigSetting" Trying to delete the ConfigSetting File
My neice had a virus which I successfully cleaned out, but now every time I start up the laptop I get an error message that it couldn't load "C:\Users\her name\AppData\Local\Call Kit\CallKit.dll" and I am having a real trial with attempting t...
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 22:18.
Find Us