So, please bear with me. This is only the second batch file I've ever written and my first post anywhere on StackExchange.
I'm writing a batch file that tells a remote server to run HP Array Diagnostic Utility and pull the report back to my computer. I'm extremely excited because it's working very well, for the most part. I do have one minor issue, though. I'm trying to pull the serial number from the text file within the zip folder that comes from the remote server. When I pull the information from a test text file not inside a compressed folder, this part of the code works. It doesn't work when the text file is in the zip folder, though. Is there a way to get this to work?
Here is the portion of the code in question:
FOR /f "tokens=1-4 delims= " %%A IN ("%userprofile%\Desktop\report.zip\report.txt") DO (
IF %%A ==Chassis (
SET "sn=%%D"
ECHO %sn%
)
)
Thank you.