Search found 8 matches

by Avanatus
28 Jul 2016 15:11
Forum: DOS Batch Forum
Topic: Can't get returnvalue from called batch file
Replies: 21
Views: 17365

Re: Can't get returnvalue from called batch file

Hi douglas, in the meantime i played a lill bit arround. I found out: If i remove the CALL _04_CODERomaninDezimal.cmd SETCodeStart !Filename! from the FOR ... IN ... DO statement FOR %%i IN (!SourceDirectoryCounter!*!FileExtension!) DO ( SET Filename=%%~ni CALL :StrLength !Filename! CALL :SETStrLeng...
by Avanatus
27 Jul 2016 16:33
Forum: DOS Batch Forum
Topic: Can't get returnvalue from called batch file
Replies: 21
Views: 17365

Re: Can't get returnvalue from called batch file

Hi douglas, i changed the code to the snippet you created and inserted an ECHO to see that the calculation works. Here is the code i inserted: :: Calculate Roman To decimal (1-999) - 072016 @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION CALL :%* ENDLOCAL & (%RETURN_CMD%) EXIT /B %EXIT_CODE% :SETCodeS...
by Avanatus
27 Jul 2016 14:34
Forum: DOS Batch Forum
Topic: Can't get returnvalue from called batch file
Replies: 21
Views: 17365

Re: Can't get returnvalue from called batch file

Hi Douglas, i just replaced in the test.cmd and the RomanInDecimal.cmd the code snippet from the forum. But here the whole code again: Test.cmd: @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION SET Date=%date% SET Time=%time:~0,5% SET LocalisationFileName=Ava_Ger_Army_units.csv SET FileExtension=.dds SET C...
by Avanatus
27 Jul 2016 13:56
Forum: DOS Batch Forum
Topic: Can't get returnvalue from called batch file
Replies: 21
Views: 17365

Re: Can't get returnvalue from called batch file

First of all - thanks for your patience Next Test.... I changed Test.cmd to ECHO ##### Filename in test.cmd before CALL: !Filename! ##### CALL _04_CODERomaninDezimal.cmd SETCodeStart !Filename! ECHO ##### RETURNVALUE in test.cmd after CALL: %RETURNVALUE% ##### ECHO ##### errorlevel in test.cmd after...
by Avanatus
27 Jul 2016 10:37
Forum: DOS Batch Forum
Topic: Can't get returnvalue from called batch file
Replies: 21
Views: 17365

Re: Can't get returnvalue from called batch file

Hi all, i changed the code to : ::RomanToDecimal.cmd :SETCodeEnd ECHO ##### ##### DecimalNumber In RomanToDecimal.cmd: %DecimalNumber% ##### ##### ENDLOCAL & SET RETURNVALUE=%DecimalNumber% EXIT /B %RETURNVALUE% and ::Testcmd ECHO ##### Filename in test.cmd before CALL: !Filename! ##### CALL _04...
by Avanatus
27 Jul 2016 06:04
Forum: DOS Batch Forum
Topic: Can't get returnvalue from called batch file
Replies: 21
Views: 17365

Re: Can't get returnvalue from called batch file

Hello douglas. thanks for your explanations and examples I changed the code to your suggestions. This is the result (Echo): ##### Filename in test.cmd before CALL: ger_army_C ##### ##### ##### DecimalNumber In RomanInDecimal.cmd: 100 ##### ##### ##### DecimalNumber in test.cmd after CALL: 0 ##### ##...
by Avanatus
27 Jul 2016 02:01
Forum: DOS Batch Forum
Topic: Can't get returnvalue from called batch file
Replies: 21
Views: 17365

Re: Can't get returnvalue from called batch file

Hello foxidrive, here is the code: This is the caling batch file: @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION SET Date=%date% SET Time=%time:~0,5% SET LocalisationFileName=Ava_Ger_Army_units.csv SET FileExtension=.dds SET CounterName=ger_first_army SET FileNameStandart=Ger_Army_ SET StrLengthFileNameS...
by Avanatus
26 Jul 2016 19:01
Forum: DOS Batch Forum
Topic: Can't get returnvalue from called batch file
Replies: 21
Views: 17365

Can't get returnvalue from called batch file

Hi all, i searched with google but cant find a solution for me that works. I have 2 Batchfiles 1. test.cmd runs a for next loop - calls a function via: CALL RomanInDecimal.cmd SETCodeStart !Filename! 2. RomanInDecimal.cmd calculates the decimal number from a roman number and returns via SET DecimalN...