Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Transfer files on windows network (See related posts)

From Fadly Tabrani's recipe.
You need his implementation of netcopy, netmove, netdelete.
pywin32 extension required.
   1  
   2  # Copy "c:\documents" folder/file to "c:\transferred" on host "w0001".
   3  netcopy('w0001', 'c:\\documents', 'c:\\transferred')
   4  
   5  # Move with account credentials.
   6  netmove('w0001', 'c:\\documents', 'c:\\transferred', 'admin', 'adminpass')
   7  
   8  # Delete with another account.
   9  netdelete('w0001', 'c:\\transferred', 'testdom\\user1', 'user1pass')

You need to create an account or log in to post comments to this site.


Click here to browse all 5551 code snippets

Related Posts