We help IT Professionals succeed at work.
Get Started

How to copy files and retain permissions of target folder

Last Modified: 2015-08-16
I need to create a process that will copy all .pdf files from one location (Windows Server 2003 directory) to another location (Windows Server 2008 R2) nightly. Once the files have been copied over I need them permissions of the target folder to be applied to them.

I tried to create a batch file that will be ran by Windows Scheduled Tasks nightly. The batch file simply copies the files from point A to point B. However the permissions of the target folder are not being applied. Because when I try to access any of the copied pdf files via a web application I have that views this directory I get an access denied error. If I simply go to the directory and refresh the permissions by taking them out and putting them back in for the account in question the error goes away.

Any suggestions?
Watch Question
End-user support
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE