XCOPY folder on server to local directory

Posted on 2005-04-19
Last Modified: 2008-01-09
Im trying to use XCOPY to copy the www.logs directory from my web server to the same directory on my web trends is my code:

@echo off
echo Copying log files from IP-WEB to Web Trends Server...
echo =======================================================
XCOPY /E /C /I/ /H /R /S /Y \\ip-web\d$\www.logs\*.* D:\www.logs\
echo Files copied

everytime i run it i get an "invalid switch- /" error.  im runnig the script on the web trends server and once i get it to work it will become a sceduled task to run at 10pm every night.  If anyone can help me here that would be awesome...thanks

Question by:dlev15
    1 Comment
    LVL 30

    Accepted Solution

    Looks like an extra / in command:

    XCOPY /E /C /I/ /H /R /S /Y \\ip-web\d$\www.logs\*.* D:\www.logs\

    Try this:

    XCOPY /E /C /I /H /R /S /Y \\ip-web\d$\www.logs\*.* D:\www.logs\

    Good Luck,

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
    Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now