DW Upload Selected File Extension
Adds Explorer context actions:
DW: Upload Selected File
DW: Download Selected File
DW: Upload Selected Folder
DW: Download Selected Folder
What it runs
Upload:
dw env <env-name> && dw files ./DWProject.Files/Files/path/to/file.ext /path/to --import --overwrite
Upload folder:
dw env <env-name> && dw files ./DWProject.Files/Files/path/to/folder /path/to --import --overwrite --asDirectory
Download:
dw env <env-name> && dw files ./DWProject.Files/Files/path/to/file.ext /path/to --export --overwrite
Download folder:
dw env <env-name> && dw files ./DWProject.Files/Files/path/to/folder /path/to --export --overwrite --asDirectory
The file paths are generated from the selected file.
Settings
Configure .vscode/dw-files.json:
{
"activeProfile": "staging",
"context": "DWProject.Files/Files",
"ignore": [
"Files/Integration/jobs",
"System/Log",
"System/Repositories",
"System/SmartSearches",
"System/LiveIntegration",
"/.vscode",
"/.git",
"/.cache",
"GlobalSettings.*",
"*.license",
".DS_Store",
"*.gz",
"*.log",
"_parsed",
"Cache.net"
],
"profiles": [
{
"name": "staging",
"env": "dw-staging",
"uploadOnSave": true
},
{
"name": "production",
"env": "dw-production",
"uploadOnSave": false
}
]
}
context: workspace-relative folder that acts as local root (shared by all profiles).
ignore: glob-like patterns checked against context-relative paths (leading / means workspace-root path); shared by all profiles.
profiles: array of upload profiles.
profiles[].name: profile name shown in the profile picker.
profiles[].env: Dynamicweb environment name used by dw env.
profiles[].uploadOnSave: when true, saving an eligible file automatically runs upload using this profile when it is active.
activeProfile: optional default profile used by DW: Upload Selected File and auto-upload on save.
Context menu commands:
DW: Upload Selected File: uploads using activeProfile (or first profile if not set).
DW: Download Selected File: downloads using activeProfile (or first profile if not set).
DW: Upload Selected Folder: uploads folder(s) using activeProfile and --asDirectory.
DW: Download Selected Folder: downloads folder(s) using activeProfile and --asDirectory.
DW: Upload Selected File (Choose Profile): lets you pick any configured profile at upload time.
How to use
- Start the launch profile
VS Code: DW Upload Extension.
- In the Extension Development Host window, right-click a file or folder under your configured
context path.
- Click the matching upload/download command for file or folder.
The command runs in an integrated terminal named DW Upload.
Publish packaging
One-time setup:
npm install -g @vscode/vsce
Login to VS Marketplace publisher:
vsce login carrot-solutions-pty-ltd
When prompted, paste your Azure DevOps Personal Access Token (PAT).
Create the extension package (.vsix):
vsce package
Optional publish command:
vsce publish