Trying to serve a local folder as WebDAV using a .bat file to run at startup.
I want to do this silently, but can't get it to work. I don't want a console window open, I need it running 24x7
Run the command 'rclone version' and share the full output of the command.
rclone version 19
rclone v1.62.2
- os/version: Microsoft Windows 11 Pro 22H2 (64 bit)
- os/kernel: 10.0.22621.1555 Build 22621.1555.1555 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.20.2
- go/linking: static
- go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
NA, I'm using a local filepath
The command you were trying to run (eg rclone copy /tmp remote:tmp)
Startup_WebDAV.bat =>
@echo off
@rclone serve webdav --no-console --quiet "D:\path\to\directory"
The rclone config contents with secrets removed.
empty file, I'm not using anything, its a fresh install on windows.
A log from the command with the -vv flag
This is opposite of what I'm trying to do but...
2023/04/20 18:39:21 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "serve" "webdav" "-vv" "D:\path\to\directory"]
2023/04/20 18:39:21 DEBUG : Creating backend with remote "D:\path\to\directory"
2023/04/20 18:39:21 DEBUG : Using config file from "C:\\Users\\[USERNAME]\\AppData\\Roaming\\rclone\\rclone.conf"
2023/04/20 18:39:21 DEBUG : fs cache: renaming cache item "D:\path\to\directory" to be canonical "//?/D:\path\to\directory"
2023/04/20 18:39:21 INFO : Local file system at //?/D:\path\to\directory: poll-interval is not supported by this remote
2023/04/20 18:39:21 NOTICE: Local file system at //?/D:\path\to\directory: WebDav Server started on [http://127.0.0.1:8080/]
2023/04/20 18:39:27 INFO : Signal received: interrupt
2023/04/20 18:39:27 DEBUG : 4 go routines active
Terminate batch job (Y/N)? y
I appologise, the error was It can't be run with quiet, nothing with no-console, but the console shows up, so it serves no purpose.
utkarsh ~ ﮫ0ms⠀ rclone serve webdav -vv --no-console --quiet "D:\path\to\directory"
2023/04/20 21:33:56 Can't set -v and -q
utkarsh ~ ﮫ464ms⠀ rclone serve webdav -vv --no-console "D:\path\to\directory"
2023/04/20 21:34:07 DEBUG : rclone: Version "v1.62.2" starting with parameters ["C:\\Users\\utkar\\AppData\\Local\\Microsoft\\WinGet\\Packages\\Rclone.Rclone_Microsoft.Winget.Source_8wekyb3d8bbwe\\rclone-v1.62.2-windows-amd64\\rclone.exe" "serve" "webdav" "-vv" "--no-console" "D:\path\to\directory"]
2023/04/20 21:34:07 DEBUG : Creating backend with remote "D:\path\to\directory"
2023/04/20 21:34:07 DEBUG : Using config file from "C:\\Users\\utkar\\AppData\\Roaming\\rclone\\rclone.conf"
2023/04/20 21:34:07 DEBUG : fs cache: renaming cache item "D:\path\to\directory" to be canonical "//?/D:\path\to\directory"
2023/04/20 21:34:07 INFO : Local file system at //?/D:\path\to\directory: poll-interval is not supported by this remote
2023/04/20 21:34:07 NOTICE: Local file system at //?/D:\path\to\directory: WebDav Server started on [http://127.0.0.1:8080/]
2023/04/20 21:34:13 INFO : Signal received: interrupt
2023/04/20 21:34:13 DEBUG : 4 go routines active
The one thing it does seem to do, is minimise the window.
So I was already using task scheduler to run the script, the only thing I did different was use the default setting to run it when the user is logged in.