Hi, I'm new to VB (obviously) and I'm trying to create a program that will copy the contents of a CD (to distribute on that CD) to a hard drive. I have tried using a batch program with the "xcopy" command, but Windows XP just doesn't work with a DOS shell too well. Is there a way I can do this with VB Or possibly even Javascript

Simple copy program
Breckish
lokeshbohra
What is not working with that batch How do you ensure that the current directory which you reference with . is set to the CD or DVD directory you want to copy
Does C:\CDcontents exist Otherwise you must create it with md.
--
SvenC
Sujeet Kuchibhotla
'// Define the source and target paths (hardcoded just for the idea).
'// Use VB's "MY" namespace for an easy shortcut.Dim SourcePath As String = "D:\"
Dim TargetPath As String = "C:\Temp"
'// Ofcourse you can give additional parameters for copying directories
'// and files, but this should get you started.
My.Computer.FileSystem.CopyDirectory(SourcePath, TargetPath)
seco
Here's my xcopy program:
xcopy /s .\ C:\CDcontents
echo Files copied to "CDcontents" in "C" drive.
break
I'll try the VB program and let you know if it works.
DJacobson
Hi,
what is your xcopy problem That should work.
--
SvenC
kp6452
So you are always copying to C:\ - if you distribute that to a wider range you can get into trouble as not all people want stuff on C:\ or maybe their C:\ is almost full and D:\ or some other partition would be more apropriate.
Just a guess.
--
SvenC
CraigInCalifornia
Redburga
the problem there is that you have .\ which you shouldnt. As well as this, the usage is wrong. it should be:
xcopy C:\CDContents DestinationPathHere /s
usage:
xcopy source [destination] [switches]