Jump to content

Recommended Posts

Posted

I need to copy files from network share to network share also also, I need use a different user account to have rights over the network share (need write right) and I need to copy the files with the NTFS rights.

my idea unsuccess:

runaswait, cmd, copy from unc path (fails), map share (fails from runaswait but works if i type in) , xcopy /T /E /O

How would you start?

Posted

I need to copy files from network share to network share also also, I need use a different user account to have rights over the network share (need write right) and I need to copy the files with the NTFS rights.

my idea unsuccess:

runaswait, cmd, copy from unc path (fails), map share (fails from runaswait but works if i type in) , xcopy /T /E /O

How would you start?

Use RoboCopy instead of xcopy.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

What is the difference? this is also does not work....

$uncPS = "\\server2\projects\_TemplateProject\Project_TMP\"

$uncCS = "\\server2\projects\_TemplateProject\Client_TMP\"

$uncT = "\\server2\projects\"

$nwclient ="test3"

Local $RunC = RunAsWait( $sUserName, $sDomain, $sPassword, 0, "robocopy "& $uncCS & " " & $uncT & $nwclient & "\ /E /COPY:DATS", @TempDir, @SW_MAXIMIZE )

Posted

I don't want to set ACL for my deep folder tree, I want to copy my template folders with ACL.

Just do first FileCopy, then apply the CACLS (you can use cacls for non-recursive also... cacls /? in command prompt and you'll see all the functions)
Posted

If you want to copy NTFS ACLs, then you have to access by the NTFS file system objects, which means as locally mounted drives, not as UNC share paths. I don't think you can see, let alone copy NTFS level permissions through the CIFS share.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted (edited)

Ok you are right. I tried to map network drive than copy, but mapping fails.

NET USE P: \\server2\projects\ && xcopy source target /E /T /S -

If I tried to open a cmd window with network admin user account, I am able to map and copy but this fails if I try to call all command in one line, like this example.

Local $RunC = RunAsWait($sUserName, $sDomain, $sPassword, 0, "cmd /k cd\ && NET USE P: \\server2\projects\", @SystemDir)

I got system error 67 - network drive not found

Please help :)

Edited by spuri

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...