dispro wrote:Let me clarify my question:
I have *.txt file that looks like these:
111/222/333/444/555
[unuseful stuff removed from this place...]
The problem is that i would like that my *.txt file will look like these (so it would be easier to read):
111
222
333
444
555
What changes i should do un my code so it will be able to read the *.txt file and show the data in the same way?
Thanks
Delete all the "index_..." variables stuff from your code, change this line:
Code: Select all
for /f "tokens=%index_soft%-%index_versiune% delims=/" %%1 IN (Database_version.txt) DO (
... by this one:
Code: Select all
for /f "tokens=1-3 delims=/" %%1 IN (Database_version.txt) DO (
... and move ALL THE CODE delimited by ":nextsoft" and "goto :nextsoft"
inside previous FOR loop, that is:
Code: Select all
for /f "tokens=1-3 delims=/" %%1 IN (Database_version.txt) DO (
set Soft=%%1
set Soft_key=%%2
set Soft_V=%%3
MOVE ALL THE CODE HERE
)
However, you must also replace all %variable%
inside the FOR loop by !variable! and insert "setlocal EnableDelayedExpansion" command at beggining...
Another easier solution is to move all that code into a
subroutine and then use "call :theSubroutineName" instead of "MOVE ALL THE CODE HERE" above.
Ah! And also change your Database_version.txt file from this:
Code: Select all
Customization_McoLte_Metrocell/{379CA25D-9F17-4435-B9BD-94B30699FCB0}/2.0.0/Customization_McoLte_Metrocell_ALPID/{52B2140C-D20A-4159-B88D-22263C55D4DF}/2.2.0/System_McoLte_Metrocell/{A4060419-1D13-468B-8E01-AFE508D319D9}/4.2.0/System_McoLte_Metrocell_ALPID/{8D685F81-04E6-49AB-B206-8064D3FADDBC}/3.3.0/Onetool//{BE0CC86F-F9C3-45C7-9343-43D663935464}/1.6.25/Module_MroLte_CubeDock/{C9C1A7D9-ADE3-4771-B9F7-3E6F617EC74F}/4.2.0/Module_MroLte_CubeDock_ALPID/{D4CA152F-6186-4F4B-85A0-6F5587CC506E}/4.0.0/System_MCOLte_Metrocell_User/{8BA0661C-6D08-4506-96C5-8D81DC909E8A}/1.2.0/END/END/END
... to this:
Code: Select all
Customization_McoLte_Metrocell/{379CA25D-9F17-4435-B9BD-94B30699FCB0}/2.0.0
Customization_McoLte_Metrocell_ALPID/{52B2140C-D20A-4159-B88D-22263C55D4DF}/2.2.0
System_McoLte_Metrocell/{A4060419-1D13-468B-8E01-AFE508D319D9}/4.2.0
System_McoLte_Metrocell_ALPID/{8D685F81-04E6-49AB-B206-8064D3FADDBC}/3.3.0
Onetool//{BE0CC86F-F9C3-45C7-9343-43D663935464}/1.6.25
Module_MroLte_CubeDock/{C9C1A7D9-ADE3-4771-B9F7-3E6F617EC74F}/4.2.0
Module_MroLte_CubeDock_ALPID/{D4CA152F-6186-4F4B-85A0-6F5587CC506E}/4.0.0
System_MCOLte_Metrocell_User/{8BA0661C-6D08-4506-96C5-8D81DC909E8A}/1.2.0
Antonio