Batch file copy

G

Guest

I have short cut to a batch file that copies files from a network server to
the local machine. It works fine on XP, but it won't work on Vista Home.
I've tried right clicking on the short cut and saying "Run as Administrator"
and that doesn't work either. When I open a DOS prompt window and type the
copy command there, I get an "Access Denied" error. So I'm guessing the
batch file is executing properly, it's just failing on all the copy commands.
I CAN manually drag and drop the files from the server to the local machine
- I just want a way to do it automatically through a batch file.

I don't normally use Vista, so I may be missing something fairly basic here.
Sorry, if that's the case.
 
A

Andrew McLaren

EruditeBonnie said:
and that doesn't work either. When I open a DOS prompt window and type
the
copy command there, I get an "Access Denied" error. So I'm guessing the
batch file is executing properly, it's just failing on all the copy
commands.

Hi Bonnie,

What happens if you right-click on the Command Prompt icon and choose "run
as Administrator", and run the batch file from an Administrative command
prompt? Do you still get "Access Denied"?

(doesn't solve your problem, but might help understand it better).

Where are you copying the files to, on the local machine? Some locations are
highly protected on Vista, to protect against viruses etc.

Other locations are actually junction point aliases, for locations which
have changed in Vista. For example on XP the user has a directory called
"%UserProfile%\My Documents". On Vista, this has changed to
"%UserProfile%\Documents". There is a file system object called "My
Documents" on Vista but it isn't a real directory, it's a junction point
that points towards the Documents directory. If you try to read or write to
My Documents directly, you'll get "Access denied". In this case, you'd need
to change the batch file to copy to "%UserProfile%\Documents" instead.

Vista starts to make sense, after a while ... first 2 or 3 years are the
hardest, it gets easier after that ...
 

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