Help with Bat file

R

RScotti

Hi,
I am trying to use my bat file that was in XP but having problems. What am I doing wrong?
Agent is the only one working. All the others seem to have "access denied" There all going to my external HD.
Here is the Bat file:
@echo off
xcopy /s /y /d /h /c "C:\users\rls\Agent" "E:\Agent\"
xcopy /s /y /d /h /c "C:\Users\rls\Documents" "E:\Documents\"
xcopy /s /y /d /h /c "C:\Users\rls\Downloads" "E:\Downloads\"
xcopy /s /y /d /h /c "C:\USERS\RLS\Pictures" "E:\Pictures\"
xcopy /s /y /d /h /c "C:\Users\rls\Favorites" "E:\Favorites\"
xcopy /s /y /d /h /c "C:\Users\rls\Backup" "E:\Backup\"
xcopy /s /y /d /h /c "C:\Users\rls\Backup" "E:\ABackup\"

This is what happens:
C:\Windows\system32>vb1
C:\users\rls\Agent\Data\AGENT.INI
C:\users\rls\Agent\Data\agentini.bak
C:\users\rls\Agent\Data\folders.dat
C:\users\rls\Agent\Data\junk.zf
C:\users\rls\Agent\Data\MWORDS.DAT
C:\users\rls\Agent\Data\MWORDS.IDX
C:\users\rls\Agent\Data\tasklog.xml
7 File(s) copied
Access denied
Unable to create directory - E:\Documents
0 File(s) copied
0 File(s) copied
Access denied
Unable to create directory - E:\Pictures
0 File(s) copied
Access denied
Unable to create directory - E:\Favorites
0 File(s) copied
Access denied
Unable to create directory - E:\Backup
0 File(s) copied
Access denied
Unable to create directory - E:\ABackup
0 File(s) copied

Have a good day,
RScotti

remove "nospam" in order to email me.
 
R

RScotti

I think I found part of the problem. They all are READ ONLY and even though I am the Administrator It keeps going back
to read only when I try to change it.I don't know how to fix this?

The Agent folder is also read only but seems to work copying?

Hi,
I am trying to use my bat file that was in XP but having problems. What am I doing wrong?
Agent is the only one working. All the others seem to have "access denied" There all going to my external HD.
Here is the Bat file:

This is what happens:

Have a good day,
RScotti

remove "nospam" in order to email me.

Have a good day,
RScotti

remove "nospam" in order to email me.
 
G

Good News!

"Access denied" kind of gives it away. You do not have the relevant
permissions to access those folders.

: Hi,
: I am trying to use my bat file that was in XP but having problems. What am
I doing wrong?
: Agent is the only one working. All the others seem to have "access denied"
There all going to my external HD.
: Here is the Bat file:
: >@echo off
: >xcopy /s /y /d /h /c "C:\users\rls\Agent" "E:\Agent\"
: >xcopy /s /y /d /h /c "C:\Users\rls\Documents" "E:\Documents\"
: >xcopy /s /y /d /h /c "C:\Users\rls\Downloads" "E:\Downloads\"
: >xcopy /s /y /d /h /c "C:\USERS\RLS\Pictures" "E:\Pictures\"
: >xcopy /s /y /d /h /c "C:\Users\rls\Favorites" "E:\Favorites\"
: >xcopy /s /y /d /h /c "C:\Users\rls\Backup" "E:\Backup\"
: >xcopy /s /y /d /h /c "C:\Users\rls\Backup" "E:\ABackup\"
:
: This is what happens:
: >C:\Windows\system32>vb1
: >C:\users\rls\Agent\Data\AGENT.INI
: >C:\users\rls\Agent\Data\agentini.bak
: >C:\users\rls\Agent\Data\folders.dat
: >C:\users\rls\Agent\Data\junk.zf
: >C:\users\rls\Agent\Data\MWORDS.DAT
: >C:\users\rls\Agent\Data\MWORDS.IDX
: >C:\users\rls\Agent\Data\tasklog.xml
: >7 File(s) copied
: >Access denied
: >Unable to create directory - E:\Documents
: >0 File(s) copied
: >0 File(s) copied
: >Access denied
: >Unable to create directory - E:\Pictures
: >0 File(s) copied
: >Access denied
: >Unable to create directory - E:\Favorites
: >0 File(s) copied
: >Access denied
: >Unable to create directory - E:\Backup
: >0 File(s) copied
: >Access denied
: >Unable to create directory - E:\ABackup
: >0 File(s) copied
: >
:
: Have a good day,
: RScotti
:
: remove "nospam" in order to email me.
:
 
R

RScotti

Hi David,
Thank you so much. That did it.
I forgot all about that.:(
Right-click on your batch file and select Run as administrator.

Have a good day,
RScotti

remove "nospam" in order to email me.
 
R

Richard Urban

1. Read only will never stop you from copying a file or folder. The copy
will just be read only also.

2. Many system folders appear read only but they are not. If you open the
folder you will find that you can change a file name, alter a text file etc.
It's just the it is since Windows XP.

--


Regards,

Richard Urban MVP
Microsoft Windows Shell/User
 

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