Windows Service

HTTP Listener File Management

Token + IP Security

Every request requires a secret token. Optionally restrict access to a whitelist of IP addresses.

Pure JSON API

Simple HTTP POST requests with JSON body. No SDKs required — works with any HTTP client in any language.

Runs as Windows Service

Installs via MSI in one click. Starts automatically on boot, runs silently in the background.

Quick Start

1Install the service

Run HttpListenerFileMgt.msi as Administrator. The installer copies files, registers the HTTP port, creates and starts the Windows service automatically.

2Configure appsettings.json

Located at C:\Program Files\HttpListenerFileMgt\appsettings.json

{
  "Listener": {
    "Port": 9696,
    "SecretToken": "your-secret-token"
  },
  "Security": {
    "AllowedIPs": []
  }
}

Leave AllowedIPs empty to allow all IPs, or add specific addresses to restrict access.

Supported Commands

All requests are HTTP POST to http://<host>:9696/ with a JSON body.

Command What it does Required fields
GET_FILE_LISTReturns all file names in a directorypath
GET_FILEDownloads a file as Base64Url stringpath
PUSH_FILEUploads / overwrites a file on the serverpath, FileInBase64Url
DELETE_FILEPermanently deletes a filepath
EXIST_DIRChecks if a directory existspath
EXIST_FILEChecks if a file existspath
MOVE_FILEMoves a file to another locationpath, toPath

Request

{
  "token": "your-secret-token",
  "cmd":   "GET_FILE_LIST",
  "path":  "C:\\Data\\Files"
}

Response

{
  "cmd":      "GET_FILE_LIST",
  "Done":     true,
  "FileList": [
    { "FileName": "C:\\Data\\Files\\doc.pdf" },
    { "FileName": "C:\\Data\\Files\\report.xlsx" }
  ]
}

Request

{
  "token": "your-secret-token",
  "cmd":   "GET_FILE",
  "path":  "C:\\Data\\Files\\doc.pdf"
}

Response

{
  "cmd":             "GET_FILE",
  "Done":            true,
  "FileInBase64Url": "JVBERi0xLjQ..."
}

Request

{
  "token":           "your-secret-token",
  "cmd":             "PUSH_FILE",
  "path":            "C:\\Data\\Files\\hello.txt",
  "FileInBase64Url": "SGVsbG8gV29ybGQh"
}

Response

{
  "cmd":          "PUSH_FILE",
  "Done":         true,
  "ErrorMessage": ""
}

Request

{
  "token":  "your-secret-token",
  "cmd":    "MOVE_FILE",
  "path":   "C:\\Data\\Files\\doc.pdf",
  "toPath": "C:\\Data\\Archive\\doc.pdf"
}

Response

{
  "cmd":          "MOVE_FILE",
  "Done":         true,
  "ErrorMessage": ""
}

Error Handling

HTTP 400 — Request-level errors

Returned when the token is wrong, the JSON is invalid, or the command is unknown. The response body is a plain-text message, e.g. "Wrong token".

HTTP 200 with ErrorMessage

Operation-level errors (file locked, path not found, etc.) return Done: true and a non-empty ErrorMessage in the JSON body.

Ready to get started?

Download the installer and have the service running in under two minutes.

Download HttpListenerFileMgt.msi

Windows 10 / Server 2016  ·  .NET 9 Runtime required  ·  Run installer as Administrator