Skip to content

Instantly share code, notes, and snippets.

@paulbrodner
Last active February 24, 2016 10:31
Show Gist options
  • Select an option

  • Save paulbrodner/021778feb5127e5307b2 to your computer and use it in GitHub Desktop.

Select an option

Save paulbrodner/021778feb5127e5307b2 to your computer and use it in GitHub Desktop.
WebDav (map drive)
@echo off
REM Prerequisites Windows7
REM http://docs.alfresco.com/4.0/tasks/tuh-maptodrive.html
REM - WebClient enabled
REM - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WebClient\Parameters\BasicAuthLevel DWORD created with value = 2
echo ---------------------------------
echo Mapping WebDav driver to Z:\\
if "%~4"=="" (
echo Duude, you need to pass more arguments:
echo Example: map.bat 127.0.0.1 testSiteName username password
goto :eof
)
set alfresco_server=%~1
set site=%~2
set username=%~3
set password=%~4
set command=\\%alfresco_server%@8080\alfresco\webdav\Sites\%site%\documentLibrary %password% /user:%username% /persistent:yes
echo Running Command: %command%
net use Z: %command%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment