Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to copy a folder to a different loc  using DOS  (Read 2199 times)

0 Members and 1 Guest are viewing this topic.

pinto19

  • Guest
How to copy a folder to a different loc  using DOS
« on: March 18, 2007, 07:18:33 AM »
Hello,
kinda stuck with this and hoping someone can help. I am trying to copy a folder from a network drive and putting it in a local pc and I know I can do this by dragging and dropping the folder in Windows, but would like to automate this using a batch file. I am stuck on the commands to use to copy the whole folder. Here is what I have. Please let me know where I am going wrong.
Location of the network folder that I want to copy from: g:\swdist\software\campaign software\campaign\start menu (the start menu has couple of subfolders as well)
Location where I want this copied to : c:\documents and setting\current user\start menu

I am using
cd\
g:
cd swdist\software\campaign software\campaign\
xcopy start menu %userprofile%\start menu

This is giving me a syntex error. Any guidance will be greatly appreciated.

Thanks

WillyW



    Specialist
  • Thanked: 29
  • Experience: Experienced
  • OS: Windows XP
Re: How to copy a folder to a different loc  using
« Reply #1 on: March 18, 2007, 09:02:11 AM »
Quote

- - -

xcopy start menu %userprofile%\start menu

This is giving me a syntex error. Any guidance will be greatly appreciated.



For examples, syntax, etc.,   check out:
http://www.computerhope.com/xcopyhlp.htm

and/or
at your command line:     xcopy /?      
( if it rolls off the top of your screen,  then     xcopy /?  | more  )

First up -  look for the   /e   switch.   Read its description.  
Then be sure to read all the way to the bottom of the page.



Something like:

Code: [Select]
xcopy g:\swdist\software\campaign software\campaign\start menu\*.*    c:\documents and setting\current user\start menu  /e

is worth experimenting with.  


I hope this helps.



.



thiru8625

  • Guest
for copying
« Reply #2 on: March 19, 2007, 04:23:18 AM »
xcopy g:\swdist\software\campaign software\campaign\start menu\*.*    c:\documents and setting\current user\start menu  /e
 

Like U Try For Copiying