Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1961
  • Last Modified:

XCOPY folder on server to local directory

Im trying to use XCOPY to copy the www.logs directory from my web server to the same directory on my web trends server...here is my code:

[copy.cmd]
@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
pause

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

dlev15
0
dlev15
Asked:
dlev15
1 Solution
 
SteveGTRCommented:
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,
Steve
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now