Hello MotoX80,
This -
"test" | out-file J:\Storage\Storage-Test.txt
"test" | out-file J:\Reports\Reports-Test.txt
copy-item J:\Storage\Storage-Test.txt J:\Reports copy-item J:\Reports\Reports-Test.txt J:\Storage
... -works perfect:
But the script still does not:
I also tried to copy the folder D:\TEST (instead of D:\STORAGE - to rule out the possible issues with the SOURCE folder, maybe it is excessive step since the error in the log clearly states the access is denied to J:\STORAGE - NOT to the source folder but...) but the result was exactly the same.
And the icing on the cake - I tried to copy the D:\TEST folder to J:\Reports - NOT to J:\STORAGE, e.g. to the folder in which even the script is able to create its logs:
Once again: the same script raises Access Denied error when trying to copy some files to J:\Reports and successfully writes the log to the same J:\Reports folder!!!
What am I missing here???
Regards,
Michael Firsov