how to extract a zip file and then grab its path and set the path to system path

53 views Asked by At

so if you dont get it what my actual problem is, it is that

@echo off

:: Step 1: Extract Zip File
powershell -Command "Expand-Archive -Path '%CD%\cyrex.zip' -DestinationPath '%CD%\cyrex'"

:: Step 2: Add Cyrex Folder to System Path
set PATH=%PATH%;%CD%\cyrex

:: Step 3: Compile and Run Cyrex Program
cyrex program1.crx

:: Step 4: Clean Up (optional)
del cyrex.zip

this i asked chatgpt to tell me a method to extract zip folder so that i can extract and add the path to system path, but the problem is that it isn't adding the path to the system path

i tried everything but none of them was working please help guys ;-;

1

There are 1 answers

3
uncletall On BEST ANSWER

You are currently only setting the path for your current window.

To set it permanently you need to use

setx PATH=%PATH%;%CD%\cyrex