The ChatGPT transcript showed each CAMBS practice has its own SFTP
account (YSMD is YAM62682 on io.myallylogin.com:14147), not one shared
entity login - so the wizard needed a way to set those without hand-
writing nine practice.json files. Option 5 does that, and the settings
screen now lists which login each practice will actually use.
test-login.bat tests one account on its own, with the details typed in
rather than read from a config, which isolates the account from whatever
a script is doing to the credentials. It reports password length,
stray whitespace, and $ / backtick characters - the last being the usual
reason a login works in the WinSCP window but fails from a script, since
"$pass" interpolates in PowerShell while '$pass' does not. On failure it
prints the authentication methods the server offered.
check.sh runs what has actually caught bugs here: non-ASCII characters,
"$name?" (? is legal in an unbraced variable name, so it renders empty -
this bit twice), parse errors, 5.1 syntax compatibility, and JSON validity.
Running the wizard under pwsh turned up two things review missed:
"...dated folders for $entityName?" rendered as "...dated folders for "
- ? is a legal character in an unbraced PowerShell variable name, so
this looked up a variable called entityName? and got nothing. Braced.
The settings screen showed "over (not set)" for a config whose protocol
comes from an ftps:// prefix on the host, which is exactly the case
worth spotting. It now reports what the upload will actually use, marked
"(assumed)" when it was inferred rather than set.
Melissa had to author entity.json by hand and know FTPS from SFTP to do
it - which is what broke the last two CAMBS runs. setup-entity.bat now
asks the questions and writes the file:
- protocol is a numbered menu, stored as an explicit "protocol" key that
wins over the sftp:// host prefix and the older tls flag
- pasted schemes and paths are stripped off the host before saving
- it creates the practice folders, then logs in and checks every
practice's remote folder exists, so a wrong path or protocol surfaces
in seconds instead of in the next morning's run
Also drops insurance_file_type from the required path: with no setting
the engine sends every file in the date folder minus Windows clutter, so
"No .pdf files" can't happen on a folder full of TIFs. Connection
failures now print what to change rather than just WinSCP's wording.