Re: xcopy using batch file

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"Logie Bear" <LogieBear@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:340BDE7B-1D9B-4D30-99CA-BBF8FB5BBC09@xxxxxxxxxxxxxxxx
I am trying to copy all files and folders from a directory on my computer
to
one on the server. The xcopy command I am using is:

xcopy /s /e /d /y c:\xcopy \\server01\users\niae\mydocu~1

exit

This works a treat if I type it in or copy and paste it from Notepad.
However, when I save it as a .bat file on to my desktop and try running it
it
does not work. All that happens is that the command line just endlessly
scrolls up the dos window.
Any ideas?

I supect you like the word "xcopy" too much. You already have
a folder called "c:\xcopy", which is not a particularly good idea,
and you most likely called your batch file "xcopy.bat". Never
call a batch file by the name of a system tool - it's a recipe for
disaster! Call it "MyXcopy.bat" if you like.


.



Relevant Pages

  • Re: Message on startup
    ... copy the text below and save it to a .BAT file ... if you donot know how to create a Batch file just copy the ... If it does not let you run notepad then boot windows in safe mode and ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Cant schedule a batch file to run in the XP Pro Scheduler
    ... Also look in Explorer and right-click the BAT file itself and check that all ... > a shortcut on the desktop or from the command window directly. ... > does NOT run fine is when I try to call the backup.bat batch file ... Why doesn't the XP task scheduler handle batch files? ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: question about BAT file creation
    ... I'm trying to create a BAT file which will change to each Temp folder ... drives are not directories. ... Assuming the batch file also does the deletions, ...
    (microsoft.public.windowsxp.general)
  • Re: Word cannot be used as email editor(2003)
    ... On the question of creating a batch file: ... it is a simple matter to turn Outlook ... (e.g. Thnaks is not an English word.) ... How do i create a .bat file? ...
    (microsoft.public.word.application.errors)
  • Re: Task Scheduler job Hangs (rundll32 printui.dll,PrintUIEntry)
    ... I modified my batch file to include your recommendation. ... The bat file ... related to a batch job hanging when initiated via Task Scheduler. ... I take the same batch job and initiate it with the ...
    (microsoft.public.windows.server.general)