views:

6

answers:

0

Hi,

I am facing a problem with directory attribute. I have a script that creates a sub-directory inside a given dir.

For example, the script creates directory 'auto' inside G:\root\

The script then tries to MOVE a directory from a given location to G:\root\auto\

The problem is that when it tries to perform the MOVE operation, it gets ‘Access Denied’ message. After some investigation, I found that the issue was with the parent directory G:\root. If I unset the Read-only attribute of only the G:\root folder ('auto' directory’s attribute is left as it is), the script successfully performs the MOVE operation.

This script worked fine when I executed it for the first time. As this script is scheduled to run twice a day, I noticed that the script was failing at the MOVE operation every time.

I am not sure why this is happening. :( This is weird for me because the issue seems to be with the parent folder and not the child folder that is actually getting created. Is there any way to rectify this behaviour?

I am not sure whether ATTRIB command will work. I have to try it out.

Any suggestions?

Regards,
GC