Jump to content

Simple? Robocopy command?


bizzybody

Recommended Posts

I want to write a batch file, to be run from a CD-ROM, which copies a directory and all its subdirectories and their contents to the c:\Windows\System32 tree.

On the CD it'll be arranged thus:

CD-root
|_\Directory
| |copy.bat (no other files)
|
|-\Dir to be copied
|(several files and subdirectories)

I want "Dir to be copied" to land under c:\Windows\System32 with all its files and subdirs just as they are on the CD. I can't specify a drive letter for the CD-ROM because I can't know in advance what letter it will be. I can specify c: rather than %systemroot% because I do know all PCs this will be used on will have Vista installed on the standard drive and path.

I could write a text file instructing users how to drag and drop and run a command prompt with Admin rights, copy and paste this command..., but it'll be MUCH easier to just tell people to rightclick the copy.bat file then click Run as Administrator. :)

PS. I tried XCOPY and could get it to copy the contents of the subdir, its subdirs and contents, but not the subdir itself.... d'oh. I just figured a way to do this... but the top dir I want copied one more level down in an empty dir. But 'zat, she iz not elegant methode of doing zis!

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...