1

I am trying to create a batch file that will map a shared folder on another domain. After some research, I found the NET USE command to map drives.

@echo off
Net Use M: \\IP\Folder\ /persistent:yes /USER:domain\userID PASS

This works great for mapping the drive, but when I open it, the folder is empty. When I remote desktop onto server, I can see that the folder is not empty, and I know the permissions have not changed because I just set them, and no one else has access to change them. Moreover, if I don't use NET USE and map the drive manually, i get prompted for UserName and Password, and all is well, folder is not empty.

Why is NET USE causing the folder to appear empty?

Arm0geddon
  • 466
  • 11
  • 30

2 Answers2

1

Likely because the account you used to map the drive does not have read rights on the particular files inside that folder.

Curt
  • 5,518
  • 1
  • 21
  • 35
-1
@echo off

Start \\Destination_IP\Destination_Folder_Name Password /USER:User_Name 
pause

With help of this we can open or copy a shared folder.

Suraj Singh
  • 4,041
  • 1
  • 21
  • 36