Link to home
Start Free TrialLog in
Avatar of Jasmin shahrzad
Jasmin shahrzad

asked on

map network drive

How to map network drive in windows from cmd?
the network drive is a http address.
as nextcloud dokumentation show
net use Z: https://<drive_path>/remote.php/dav/files/USERNAME/ /user:youruser
yourpassword

Open in new window

it gave error 53 in cmd. 
Avatar of Matty-CT
Matty-CT

That’s not going to work. Try a power shell command. Here’s a link on how to format the script:

https://serverfault.com/questions/690231/map-network-drive-to-a-webdav-server-via-powershell


Error 53 is a network path not found.  Are you using the correct URL with your net use command?

You might want to try using curl.exe instead.  I believe curl exist in newer versions of Windows 10 now.  Builds 1706 and earlier require a download from https://curl.se/windows/

Follow the instructions near the bottom of the screen.
Avatar of Jasmin shahrzad

ASKER

network path it's fine. Under setting in nextcloud there are a dav function and i use this link.
i can do it whiout any problem in ubuntu desktop but not in windows. there is a windows issue. I don't know where to look it? 
Your code sample suggests you might be passing your password on a second line.
If so, try putting it on the first line after your username

net use Z: https://URL/PATH/remote.php/dav/files/USERNAME/ /user:youruser yourpassword

Open in new window


Alternately you can try mapping using:

net use Z: \\URL@ssl\PATH\remote.php\dav /user:youruser yourpassword

Open in new window


or by using Windows Explorer

https://docs.nextcloud.com/server/13/user_manual/files/access_webdav.html#mapping-drives-with-the-command-line
@kenfcamp
no its just copy past, i wrote in same line. But right now i do not have certificate install in nextcloud and i write http and not https maybe it's the issue.
i wrote :
net use Z: http://ip-address/remote.php/dav/files/xxx/ /user:xxx yyyy
which my user is xxx and password is yyyy
doesn't  matter what i do i get error 67
i do not have certificate install in nextcloud

Yea, that's more than likely your issue

Personally I wouldn't recommend even attempting to connect until you get a certificate in place
Yes issue was certificate. i install certificate then used webdav and enable to share in windows 10 (dav is always off in apache2 and i don't know how to make it on. i set dav  on in apache then i can't start apache2 and say dav off  then apache2 was ok to start )
very strange from windows, just report error code 67. 
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.