Public Access
- Unblock-File the extracted WinSCP files after unzip: Windows tags downloaded files with Mark-of-the-Web, which makes Add-Type refuse to load WinSCPnet.dll (FileLoadException 0x80131515) until unblocked. - run.bat passed -EntityDir "%~dp0", but %~dp0 always ends in a trailing backslash. cmd's argument parser treats a lone backslash before a closing quote as an escaped literal quote rather than the string terminator, so PowerShell received the path with a stray " character baked in (Entities\CAMBS" instead of Entities\CAMBS), breaking Test-Path. Strip the trailing backslash before quoting it.
8 lines
285 B
Batchfile
8 lines
285 B
Batchfile
@echo off
|
|
REM Place a copy of this file inside an Entity folder (e.g. Entities\CAMBS\)
|
|
REM to run just that entity's upload.
|
|
set "ENTITY_DIR=%~dp0"
|
|
set "ENTITY_DIR=%ENTITY_DIR:~0,-1%"
|
|
powershell.exe -ExecutionPolicy Bypass -File "%~dp0..\..\engine.ps1" -EntityDir "%ENTITY_DIR%"
|
|
pause
|