@echo off
setlocal
set "CURDIR=%~dp0"

REM Tải file ehchis.zip từ FTP bằng curl (Windows 10/11 có sẵn curl)
curl -o "%CURDIR%ehchis.zip" ftp://103.98.152.68:55476/ehcHIS/ehchis.zip --user anonymous:

REM  Nếu muốn dùng user/pass là: curl -o "%CURDIR%ehchis.zip" ftp://yourusername:yourpassword@103.98.152.68:55476/ehcHIS/ehchis.zip

REM Giải nén file ZIP ra cùng thư mục bằng PowerShell
powershell -command "Expand-Archive -Force -Path '%CURDIR%ehchis.zip' -DestinationPath '%CURDIR%'"

REM Xóa file ZIP sau khi giải nén
del "%CURDIR%ehchis.zip"


echo Complete: da tai file xuong %CURDIR%
pause