Page 3 of 3 FirstFirst 123
  1.    18 Jul 2016 #21
    Join Date : Oct 2013
    Penns Forrest
    Posts : 3,506
    Win_8.1-Pro, Win_10.1607-Pro, Mint_17.3

    Command Prompt: should open to your User Profile
    (%UserProfile%)

    Command Prompt (Admin): should open to C:\Windows\system32

    Your Command screen shot indicates by the prompt that your command opens to C:\Windows
    That is not normal.

    How are you launching Command Prompt?
    There are a number of different ways (Run dialog, Quick Access Toolbar ... aka X-menu, from search results, from File Explorer blue FILE menu).

    Try Winkey Click image for larger version. 

Name:	winMenu-1.png 
Views:	14 
Size:	3.2 KB 
ID:	90805+X
    Select Command Prompt
    enter the following command

    set

    post a screen shot of the output
    then you can exit Command


    The easiest thing to do is what cerebus suggested, fully qualify the source and destination:

    Quote Originally Posted by cereberus View Post
    Well I see the xcopy command syntax looks all wrong for starters. it should look something like

    xcopy C:\sourceFolder E:\targetFolder /D /E /C /R /H /I /K /Y
    You could also pass the targetFolder as a parameter

    batFileCopy.bat E:\targetFolder

    You have to change the batch file to use the passed parameter

    xcopy C:\sourceFolder %1 /D /E /C /R /H /I /K /Y

    You would need to test that a parameter was passed
    noParm decision > prompt for targetFolder
    noParm decision > use a predefined default

    You also might want to test that the targetFolder exists
    noExist decision > offer to create it
    noExist decision > error msg and exit
      My ComputerSystem Spec
  2.    18 Jul 2016 #22
    Join Date : Aug 2015
    Posts : 369
    Windows 10 Pro

    Quote Originally Posted by iamjim View Post
    Here's another of several oddities that came with 10. The address (path?) bar at the top gives a network address rather than a local address. I don't know how to fix that or several others either.
    I just created a simple batch file that displays the current dir ('echo %cd%' command). Placed that file on a non-mapped network share ('\\FILES\Storage' in my case) and run it from there. I got this

    '\\FILES\Storage'
    CMD.EXE was started with the above path as the current directory.
    UNC paths are not supported. Defaulting to Windows directory.
    C:\Windows
    The first part is a warning that CMD.EXE gave me when I started the batch file. The last bit - C:\Windows - is the output of 'echo %cd%' command.

    I.e. when the current dir is specified by an UNC path, then the batch shell simply defaults to C:\Windows as the current dir. Apparently this is exactly what happens in your case.

    There could be something else at work here (which is hard to figure out without knowing more about your setup), but the fact that you see "network" address as the path means that the current location will be specified by an UNC path. The rest follows.
    Last edited by AndreyT; 19 Jul 2016 at 00:05.
      My ComputerSystem Spec
  3.    19 Jul 2016 #23
    Join Date : May 2016
    Posts : 63
    windows 10
    Thread Starter

    Quote Originally Posted by Slartybart View Post
    Command Prompt: should open to your User Profile
    (%UserProfile%)
    Command Prompt (Admin): should open to C:\Windows\system32
    Both do what they're supposed to do.

    Try Winkey Click image for larger version. 

Name:	winMenu-1.png 
Views:	14 
Size:	3.2 KB 
ID:	90805+X
    Select Command Prompt
    enter the following command
    set

    post a screen shot of the output
    That was a lot of trouble. So, I sure hope it leads somewhere.

    The image is large so I'm linking to it
    Last edited by iamjim; 19 Jul 2016 at 01:15.
      My ComputerSystem Spec
  4.    19 Jul 2016 #24
    Join Date : May 2016
    Posts : 63
    windows 10
    Thread Starter

    Quote Originally Posted by AndreyT View Post
    I just created a simple batch file that displays the current dir ('echo %cd%' command). Placed that file on a non-mapped network share ('\\FILES\Storage' in my case) and run it from there.
    Interesting! You may have hit upon a solution to my problem. When I ran your bat file entering the target directory by way of the drive letter I got this:

    'Other' is not recognized as an internal or external command,
    operable program or batch file.
    When I ran your bat file entering the target directory using my regular desktop shortcut I got what you got.

    I've now created a new shortcut using the route that worked. I haven't tested it yet but will shortly.
      My ComputerSystem Spec
  5.    19 Jul 2016 #25
    Join Date : May 2016
    Posts : 63
    windows 10
    Thread Starter

    This is so bizarre. The new shortcut no longer leads to a network path and the cardreader fetch bat file works. *BUT*, now the original shortcut still leads to a network path. In this network folder your bat file still fails and defaults to windows even though the cardreader fetch bat file now works in that folder too???????????
      My ComputerSystem Spec

 
Page 3 of 3 FirstFirst 123


Similar Threads
Thread Forum
How to change visual effects using batch file or registry file?
Hi there forum, how do you change the Visual effects using a batch file or registry file. Thanks, Edward.
General Support
String with spaces in set /p (batch file)
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...
Software and Apps
Can't download batch file
Can't download batch file "10services_default.bat" to solve windows 10 start menu problem.
General Support
Solved Writhing Batch File
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
General Support
Solved How do I find out what program is calling a .dll file on startup?
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...
General Support
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 04:07.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums