Windows Vista Forums

XCOPY fails in Vista

  1. #1


    Ashpoint Guest

    XCOPY fails in Vista

    I have used the following .BAT file to update a two folders on my laptop.

    Code:
    XCOPY \\server\network\Files\*.* "%userprofile%\My Documents\Files\" /D /E
    /V /F /R /Y
    
    XCOPY \\server\network\Strata\*.* "%userprofile%\My Documents\Strata\" /D /E
    /V /F /R /Y
    The file worked for years when the OS was Windows XP Pro.

    Now I have a Vista Business system, the process fails with permissions issues.



    Please advise where to look for a resolution

    Thanks in advance:


      My System SpecsSystem Spec

  2. #2


    P. Di Stolfo Guest

    Re: XCOPY fails in Vista

    Hello,

    try right-clicking the .bat and selecting "Run as administrator". Will it
    work?

    Greetings,
    P. Di Stolfo

    --
    //-----------------------------------------------------------------------------------------------------------
    // http://blog.lysorp.com - small Windows Blog in German language
    //-----------------------------------------------------------------------------------------------------------

    "Ashpoint" <Ashpoint@discussions.microsoft.com> schrieb im Newsbeitrag
    news:15E960D8-B9C0-4234-8528-2315683A942B@microsoft.com...
    >I have used the following .BAT file to update a two folders on my laptop.
    >
    >
    Code:
    > XCOPY \\server\network\Files\*.* "%userprofile%\My Documents\Files\" /D /E
    > /V /F /R /Y
    >
    > XCOPY \\server\network\Strata\*.* "%userprofile%\My Documents\Strata\" /D
    > /E
    > /V /F /R /Y
    >
    >
    > The file worked for years when the OS was Windows XP Pro.
    >
    > Now I have a Vista Business system, the process fails with permissions
    > issues.
    >
    > Please advise where to look for a resolution
    >
    > Thanks in advance:
    >


      My System SpecsSystem Spec

  3. #3


    Saucy Guest

    Re: XCOPY fails in Vista

    "Ashpoint" <Ashpoint@discussions.microsoft.com> wrote in message
    news:15E960D8-B9C0-4234-8528-2315683A942B@microsoft.com...
    >I have used the following .BAT file to update a two folders on my laptop.
    >
    >
    Code:
    > XCOPY \\server\network\Files\*.* "%userprofile%\My Documents\Files\" /D /E
    > /V /F /R /Y
    >
    > XCOPY \\server\network\Strata\*.* "%userprofile%\My Documents\Strata\" /D
    > /E
    > /V /F /R /Y
    >
    >
    > The file worked for years when the OS was Windows XP Pro.
    >
    > Now I have a Vista Business system, the process fails with permissions
    > issues.
    >
    > Please advise where to look for a resolution
    >
    > Thanks in advance:
    >



    Create a link to the batch file.

    Right-click on the link and select Properties > on the Shortcut tab hit the
    Advanced button > check the "Run as administrator" checkbox > click any OKs

    Now you run the batch file via the link. 'Hope it works.

    Saucy


      My System SpecsSystem Spec

  4. #4


    Saucy Guest

    Re: XCOPY fails in Vista

    "P. Di Stolfo" <paolodistolfo@hotmail.com> wrote in message
    news:E6F1CFAF-75F6-4229-AD3D-1FFC7A55AD97@microsoft.com...
    > Hello,
    >
    > try right-clicking the .bat and selecting "Run as administrator". Will it
    > work?
    >
    > Greetings,
    > P. Di Stolfo
    >
    > --
    > //-----------------------------------------------------------------------------------------------------------
    > // http://blog.lysorp.com - small Windows Blog in German language
    > //-----------------------------------------------------------------------------------------------------------
    >
    > "Ashpoint" <Ashpoint@discussions.microsoft.com> schrieb im Newsbeitrag
    > news:15E960D8-B9C0-4234-8528-2315683A942B@microsoft.com...
    >>I have used the following .BAT file to update a two folders on my laptop.
    >>
    >>
    Code:
    >> XCOPY \\server\network\Files\*.* "%userprofile%\My Documents\Files\" /D
    >> /E
    >> /V /F /R /Y
    >>
    >> XCOPY \\server\network\Strata\*.* "%userprofile%\My Documents\Strata\" /D
    >> /E
    >> /V /F /R /Y
    >>
    >>
    >> The file worked for years when the OS was Windows XP Pro.
    >>
    >> Now I have a Vista Business system, the process fails with permissions
    >> issues.
    >>
    >> Please advise where to look for a resolution
    >>
    >> Thanks in advance:
    >>



    That should work .. but it can't be run that way automatically .. one must
    do it manually. If you adjust a shortcut, the shortcut can be run by some
    scheduler etc. etc. At least, that's how I take it.

    Saucy


      My System SpecsSystem Spec

  5. #5


    Ashpoint Guest

    Re: XCOPY fails in Vista

    I'm not connected to the server for a few days so can't experiment but I did
    try running as administrator with the same negative result - permissions
    issue.

    However, I want to run the file from a desktop shortcut so right-clicking
    the .bat and selecting "Run as administrator" would not be my ideal answer.

    I read elsewhere that I should "Take Ownership" of the folder and haven't
    tried this. Any comment, please.

    "P. Di Stolfo" wrote:

    > Hello,
    >
    > try right-clicking the .bat and selecting "Run as administrator". Will it
    > work?
    >
    > Greetings,
    > P. Di Stolfo
    >
    > --
    > //-----------------------------------------------------------------------------------------------------------
    > // http://blog.lysorp.com - small Windows Blog in German language
    > //-----------------------------------------------------------------------------------------------------------
    >
    > "Ashpoint" <Ashpoint@discussions.microsoft.com> schrieb im Newsbeitrag
    > news:15E960D8-B9C0-4234-8528-2315683A942B@microsoft.com...
    > >I have used the following .BAT file to update a two folders on my laptop.
    > >
    > >
    Code:
    > > XCOPY \\server\network\Files\*.* "%userprofile%\My Documents\Files\" /D /E
    > > /V /F /R /Y
    > >
    > > XCOPY \\server\network\Strata\*.* "%userprofile%\My Documents\Strata\" /D
    > > /E
    > > /V /F /R /Y
    > >
    > >
    > > The file worked for years when the OS was Windows XP Pro.
    > >
    > > Now I have a Vista Business system, the process fails with permissions
    > > issues.
    > >
    > > Please advise where to look for a resolution
    > >
    > > Thanks in advance:
    > >


      My System SpecsSystem Spec

  6. #6


    Swingman Guest

    Re: XCOPY fails in Vista

    > However, I want to run the file from a desktop shortcut so right-clicking
    > the .bat and selecting "Run as administrator" would not be my ideal
    > answer.


    Strictly FWIW...

    Used xcopy in .bat file for years to backup files across networks. Since
    getting a laptop with Vista, and on the advice of someone here, and somewhat
    reluctantly, I started using SyncToy to sync my laptop and desktop, network
    drives, as well as backup files, photos, music to an external USB drive.

    I wished I would have switched long ago ... might want to check it out.

    http://www.microsoft.com/downloads/d...displaylang=en


    --
    www.e-woodshop.net
    Last update: 8/08/07
    KarlC@ (the obvious)



      My System SpecsSystem Spec

  7. #7


    Dave Guest

    Re: XCOPY fails in Vista

    "My Documents" is no longer a folder in Vista. It is a junction point.
    Try saving the files to "Documents"



    "Ashpoint" <Ashpoint@discussions.microsoft.com> wrote in message
    news:15E960D8-B9C0-4234-8528-2315683A942B@microsoft.com...
    >I have used the following .BAT file to update a two folders on my laptop.
    >
    >
    Code:
    > XCOPY \\server\network\Files\*.* "%userprofile%\My Documents\Files\" /D /E
    > /V /F /R /Y
    >
    > XCOPY \\server\network\Strata\*.* "%userprofile%\My Documents\Strata\" /D
    > /E
    > /V /F /R /Y
    >
    >
    > The file worked for years when the OS was Windows XP Pro.
    >
    > Now I have a Vista Business system, the process fails with permissions
    > issues.
    >
    > Please advise where to look for a resolution
    >
    > Thanks in advance:
    >


      My System SpecsSystem Spec

  8. #8


    Andrew McLaren Guest

    Re: XCOPY fails in Vista

    Hi Ashpoint,

    > However, I want to run the file from a desktop shortcut so right-clicking
    > the .bat and selecting "Run as administrator" would not be my ideal
    > answer.


    You can get the same effect by including a "runas" command in your batch
    file:

    C:\>runas /user:Mydomain\Administrator "XCOPY \\server\network\Files\*.*
    "%userprofile%\My Documents\Files\" /D /E /V /F /R /Y"

    You need to enter the password for the Administrator, interactively.


    > I read elsewhere that I should "Take Ownership" of the folder and haven't
    > tried this. Any comment, please.


    There are 2 main options:

    1) you can grant the user context of your XCOPY command the permissions
    needed to read the files from your file server and/or write to your user
    Documents directory. This would be the "standard" way of resolving
    permissions issues - explicitly and administratively granting permissions to
    the users who require them.

    2) as administrator, you can take ownership and change permissions on an ad
    hoc basis, from the command line. Use the "takeown" command to take
    ownership of files and directories from teh command line. Use the "icacls"
    command to change permissions on files and directories from the command
    line. icacls syntax is a little bit convoluted so you'll probably need to
    experiemnt, to find the right command syntax for your situation.

    > I'm not connected to the server for a few days so can't experiment but I
    > did
    > try running as administrator with the same negative result - permissions
    > issue.


    Vista has shifted the permissions philosopy in Windows from Discretionary
    Access Control ("DAC") towards Mandatory Access Control ("MAC"). An aspect
    of this is that you don't automatically get permssions to do whatever you
    want, just because you are the Administrator. Even the Administrator may
    need to explcitly ask for permission to do something. If you are
    Administrator, there's not much you can't ultimately take control of ... but
    you might not get it by default, out of the box.

    MAC security shemes have been common in highly-secure minicoputer
    environments since the 1980s. But this is the first time we're seeing MAC in
    a widespread mass-market desktop operating system. So it takes some people
    by surprise. It's a bit like running Secure VMS on a VAX, circa 1991 :-)

    As "swingman" suggested, Microsoft's free SyncToy may be a usefuly
    replacement for your batch file. I've used SyncToy with great success, it's
    an excellent little utility.


    Hope it helps,
    --
    Andrew McLaren
    amclar (at) optusnet dot com dot au



      My System SpecsSystem Spec

  9. #9


    Saucy Guest

    Re: XCOPY fails in Vista

    "Andrew McLaren" <andrew@fakeaddress.com> wrote in message
    news:AC6A7F0D-F42C-4ECF-94C6-E113498E757C@microsoft.com...
    > Hi Ashpoint,
    >
    >>< chop >

    >
    > Hope it helps,
    > --
    > Andrew McLaren
    > amclar (at) optusnet dot com dot au
    >


    Also being discussed is his use of "My Documents" instead of "Documents".
    Does Vista use the junction point somehow or will the command flop because
    of it?

    Saucy



      My System SpecsSystem Spec

  10. #10


    Andrew McLaren Guest

    Re: XCOPY fails in Vista

    "Saucy" <wow@now.brown.cow> wrote
    > Also being discussed is his use of "My Documents" instead of "Documents".
    > Does Vista use the junction point somehow or will the command flop because
    > of it?


    Excellent point! I didn't even notice that (d'oh).

    I haven't tested it exhaustively, but my quick test here showed a batch file
    having difficulty reading the junction point. Since the OP is using an
    easily edited batch file, and not a compiled app, it's probably better to
    specific the *real* file path with a plain "Documents", rather than "My
    Documents".

    Thanks!
    --
    Andrew McLaren
    amclar (at) optusnet dot com dot au



      My System SpecsSystem Spec

Page 1 of 2 12 LastLast
XCOPY fails in Vista

Similar Threads
Thread Thread Starter Forum Replies Last Post
xcopy ftp James VB Script 5 05 Feb 2009
robocopy or xcopy ? Vistje Vista General 0 10 Sep 2008
xcopy in vista not copying the files Santel Vista General 2 20 Nov 2007
no xcopy in vista home premium Rycho Vista file management 3 15 Nov 2007
xcopy batch martin PowerShell 7 31 May 2006