Search found 17 matches

by SilverHawk
19 Mar 2015 09:34
Forum: DOS Batch Forum
Topic: Bypass ENDLOCAL barrier
Replies: 25
Views: 17143

Re: Bypass ENDLOCAL barrier

Approved, and works in both ways.
Thank you!!

SilverHawk
by SilverHawk
19 Mar 2015 07:49
Forum: DOS Batch Forum
Topic: Bypass ENDLOCAL barrier
Replies: 25
Views: 17143

Re: Bypass ENDLOCAL barrier

Catched! Why the hell I obtain the wrong value [ blablaontent_EDE:] for O_01??? Actual result: O_01 A: [] DEBUG O_01 A: [] DEBUG O_01 B: [ blablaontent_EDE:] Premere un tasto per continuare . . . Test code: @echo off CALL:Library.Initialize SetLocal EnableDelayedExpansion ECHO O_01 A: [%O_01%] CALL:...
by SilverHawk
19 Mar 2015 06:52
Forum: DOS Batch Forum
Topic: Bypass ENDLOCAL barrier
Replies: 25
Views: 17143

Re: Bypass ENDLOCAL barrier

Hi jeb, thanks for the reply. Sorry but it's bit tricky to understand what's is causing the problem. I understood that in case of EDE the grabbed value is the previous one (may be due to a call, inside nested IF & FOR constructs). I'll try to isolate the affecting context and I'll let you know. ...
by SilverHawk
18 Mar 2015 10:18
Forum: DOS Batch Forum
Topic: Bypass ENDLOCAL barrier
Replies: 25
Views: 17143

Re: Bypass ENDLOCAL barrier

Sorry guys but I've another matter , and exactly in this line of the macro: call set "content_EDE=%%content_EDE:^!=""e^!%%"%\n% In some contexts, and I don't understand which and why, the value obtained from the macro is different for EDE (may be a previous value?). I solved remo...
by SilverHawk
13 Mar 2015 02:38
Forum: DOS Batch Forum
Topic: Bypass ENDLOCAL barrier
Replies: 25
Views: 17143

Re: Bypass ENDLOCAL barrier

UPDATE: I find out that only variables with EXACT name are exported, but not groups that begins with a prefix. I need also this case, so I modified again the macro. I post it in case it may be useful to others. @jeb: could be the right way? @Antonio: thanks for the hint, very useful. Example: SET &q...
by SilverHawk
12 Mar 2015 04:48
Forum: DOS Batch Forum
Topic: Bypass ENDLOCAL barrier
Replies: 25
Views: 17143

Re: Bypass ENDLOCAL barrier

Tested now, and obviously works as expected.
Thanks again

SilverHawk
by SilverHawk
11 Mar 2015 07:47
Forum: DOS Batch Forum
Topic: Bypass ENDLOCAL barrier
Replies: 25
Views: 17143

Re: Bypass ENDLOCAL barrier

@jeb I "improved" your macro to skip variables that are not defined, otherwise I get a wrong value. For example: SET "Var1=a" SET "Var2=" %endlocal% Var1, Var2 ECHO Var1: [%Var1%] ECHO Var2: [%Var1%] With actual macro I get: Var1: [a] Var2: ["="] With modified...
by SilverHawk
11 Mar 2015 04:08
Forum: DOS Batch Forum
Topic: need a file to echo true if along.bat is running
Replies: 4
Views: 4768

Re: need a file to echo true if along.bat is running

Usually with the %ERRORLEVEL%. In the example above I'll look for explorer.exe, in your case I think you've to look for cmd.exe. tasklist /FI "IMAGENAME eq explorer.exe" 2> NUL | find /I "explorer.exe" IF "%ERRORLEVEL%" EQU "0" ( ECHO Alive! ) ELSE ( ECHO Dead...
by SilverHawk
10 Mar 2015 11:02
Forum: DOS Batch Forum
Topic: Bypass ENDLOCAL barrier
Replies: 25
Views: 17143

Re: Bypass ENDLOCAL barrier

@jeb
I was going to forget: thanks for the comments, the macro is more clear now (not fully, but it's a start...)
by SilverHawk
10 Mar 2015 10:57
Forum: DOS Batch Forum
Topic: Bypass ENDLOCAL barrier
Replies: 25
Views: 17143

Re: Bypass ENDLOCAL barrier

@jeb Just two word: IT WORKS!!!!!!!!!!!!!!!!!! Very good job. @Aacini Sure that works, but only IF I assign O_01 at the end (just before the GOTO:EOF). I want to export also the previous assigned variables (like O_01): yes, you're right, the example I wrote above isn't very clear. Bad dog. Thanks to...
by SilverHawk
10 Mar 2015 08:33
Forum: DOS Batch Forum
Topic: Bypass ENDLOCAL barrier
Replies: 25
Views: 17143

Re: Bypass ENDLOCAL barrier

Thanks everyone for your quick reply. I already followed the jeb's link, but for what I read actually the macro is able to return only one variable. Anyway I used the macro, with initialization part that now I omit, that begin with: set ^"jebReturn=for %%# in (1 2) do if %%#==2 (%\n% setlocal E...
by SilverHawk
09 Mar 2015 08:08
Forum: DOS Batch Forum
Topic: File Transfer
Replies: 9
Views: 6144

Re: File Transfer

I confirm that the ZIP linked is the correct one.
In my opinion, you can proceed.

SilverHawk
by SilverHawk
09 Mar 2015 08:05
Forum: DOS Batch Forum
Topic: Bypass ENDLOCAL barrier
Replies: 25
Views: 17143

Re: Bypass ENDLOCAL barrier

@foxidrive: you're right. I use to modify the main question and, after, add a new post with "I modified the question in these points... Check it out". A new user has to read only the first post, to understand the question, instead to read many of them. Anyway no matter, I'll follow this ru...
by SilverHawk
06 Mar 2015 10:44
Forum: DOS Batch Forum
Topic: File Transfer
Replies: 9
Views: 6144

Re: File Transfer

For me it was enough to copy:

    WinSCP.com
    WinSCP.exe

in some folder.
Install it wasn't necessary.

SilverHawk
by SilverHawk
06 Mar 2015 08:40
Forum: DOS Batch Forum
Topic: Bypass ENDLOCAL barrier
Replies: 25
Views: 17143

Re: Bypass ENDLOCAL barrier

Sorry for this misunderstanding, in other sites is preferable to edit previous posts instead of doing whole copy / paste of the original, but modified, question. I did in this way hoping it would be better to read the post. Only for readibility reasons. Regaring the question, how do you suggest I ca...