runtime err 76 on some laptops

M

Marvin

on some laptops the following fails with a 76 run time eror on the copyfolder
line

Set FsO = CreateObject("Scripting.FileSystemObject")
sourceFolder = "CMA_Camera_Pictures"
destFolder = "C:\CRISNET\EXPORT\CMA_Camera_Pictures"
FsO.CopyFolder sourceFolder, destFolder, True

in all cases, C:\CRISNET\EXPORT already exists. Anyone have any ideas?
 
B

Bill Pfister

Marvin, are you certain the source folder "CMA_Camera_Pictures" always exists?
 
M

Marvin

Yes it always exists. What I discovered is that this error occurs when the
user has autorun turned off and then tries to run the installation
spreadsheet manually. Since I did not know the path of the CD/DVD drive spec
on everyone's machine I left it out of the path name. Apparently when the
installation spreadsheet is not run from the autorun file, the copyfolder
command fails. I am not sure why this happens since the default drive is
selected by the user to get to the installation program so I would think that
this would not be a problem.
 
B

Bill Pfister

Unfortunately, I don't know all the implications of autorunning, but you
should be able to determine the absolute path by writing some detective
routines that leverage other aspects of the FileSystemObject object.

GetAbsolutePathName on the source folder should allow you to catch the error
immediately. You can then use the Drives and DriveType properties to narrow
the list of CD drives (if the machines are all undocked laptops, the
probability of multiple cd/dvd drives is reasonably low). If they are docked
(which is something you can programmatically confirm), then you can search
for drives with media present. Once the drives are determined (if you're
lucky, there is only one), you can search the drives for specific media/files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top