The below code, for some reasons, is not working. I'm kinda new to this Windows Batch area and don't have any clue why this is not working. Sounds pretty simple and correct to me but something has gone wrong. Can you please help me? I'm running it on a Windows 10 machine.
@echo off
setlocal enabledelayedexpansion
SET pathOfFileName1 = C:\test\Dump_1_333398395823532298.zip
echo %pathOfFileName1%
PowerShell Expand-Archive "%pathOfFileName1%" "C:\test\unzip"
The pathOfFileName1 is not getting printed and the PowerShell stuff is not working when used with the variable 'pathOfFileName1'.
Powershell stuff is working when both parameters are used without any variables. echo is working when the value is directly given (instead of the variable)
Appreciate your inputs.
Thanks