Search found 15 matches

by pumi
18 Oct 2013 23:51
Forum: DOS Batch Forum
Topic: split csv-file by in-file criteria
Replies: 5
Views: 4201

Re: split csv-file by in-file criteria

try this

Code: Select all

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION

FOR /F "tokens=1,2,3 delims=;" %%A in (test.csv) do @echo %%A;%%B;%%C >> %%C
by pumi
18 Oct 2013 14:05
Forum: DOS Batch Forum
Topic: center text with echo
Replies: 6
Views: 14814

Re: center text with echo

thanks!
by pumi
18 Oct 2013 01:36
Forum: DOS Batch Forum
Topic: center text with echo
Replies: 6
Views: 14814

Re: center text with echo

thanks for your help guys.
I'll take the second one.
Maybe it's not nessesary to take the size as count.
The half size as count should work.
I'll try that...

btw: what do the "(" in "echo(!s!" ??
curiously there is no error in syntax but should be...!?
by pumi
17 Oct 2013 08:08
Forum: DOS Batch Forum
Topic: center text with echo
Replies: 6
Views: 14814

center text with echo

Hello,

how can I center a text with echo in a batch?
Can you give me a hint please?

Thank in advance for help and
greetings pumi
by pumi
08 Oct 2013 05:15
Forum: DOS Batch Forum
Topic: Characters of a string
Replies: 4
Views: 3578

Re: Characters of a string

thanks, this works!
by pumi
08 Oct 2013 00:37
Forum: DOS Batch Forum
Topic: Characters of a string
Replies: 4
Views: 3578

Re: Characters of a string

The characters are only alpha-numeric.
Simple solution is ok.
thanks
by pumi
07 Oct 2013 22:17
Forum: DOS Batch Forum
Topic: Characters of a string
Replies: 4
Views: 3578

Characters of a string

Hello,

is it possible to get every character of a string?
A string like "asdfghjkl".
I want get "a", "s", "d" and so on...
I tried many variants of a foor loop, but nothing works...
Can you give me a hint about that?

thanks in advance and greetings, pumi
by pumi
07 Oct 2013 07:04
Forum: DOS Batch Forum
Topic: insert variable into onother variable
Replies: 3
Views: 3507

Re: insert variable into onother variable

thanks for your help, it works!
by pumi
07 Oct 2013 04:46
Forum: DOS Batch Forum
Topic: insert variable into onother variable
Replies: 3
Views: 3507

insert variable into onother variable

Hello, I try insert a variable into an another variable I tried this: @echo off set fullstr=asdfghjkl set /a offset=3 set /a chcount=5 rem set substr=%fullstr:~3,5% set substr=%fullstr:~%offset%,%chcount%% <- this does't work :-( echo %substr% How can I insert the variable into an another variable? ...
by pumi
07 Oct 2013 03:12
Forum: DOS Batch Forum
Topic: @instr where does it come from
Replies: 2
Views: 2850

Re: @instr where does it come from

thanks for your help.
by pumi
07 Oct 2013 01:04
Forum: DOS Batch Forum
Topic: @instr where does it come from
Replies: 2
Views: 2850

@instr where does it come from

Hello, I tried a tool called "Take command"(a Batch IDE/debugger) In the editor of this tool I can do the following: @echo off set substr=%@instr[2,4,asdfghjkl] echo %substr% I'm now at work, without this tool and in a shell(cmd) this doesnt work. Where is this "@instr" from? (th...
by pumi
05 Oct 2013 10:16
Forum: DOS Batch Forum
Topic: Name of a function
Replies: 8
Views: 7072

Re: Name of a function

this works for me now, thanks guys
by pumi
05 Oct 2013 08:21
Forum: DOS Batch Forum
Topic: Name of a function
Replies: 8
Views: 7072

Re: Name of a function

I would like do this: @echo off call :theFunction echo theFunction goto:eof :theFunction set func=%0 echo the name of the function is %func:~1% set "%func:~1%=the result" goto:eof I want to call the function and give a return value with the same name as the function without the colon. Unfo...
by pumi
05 Oct 2013 07:50
Forum: DOS Batch Forum
Topic: Name of a function
Replies: 8
Views: 7072

Re: Name of a function

thanks for your answer.
Can I get the name without the colon...like theFunction?

pumi
by pumi
05 Oct 2013 07:22
Forum: DOS Batch Forum
Topic: Name of a function
Replies: 8
Views: 7072

Name of a function

Hello,

how can I get the name of a function.

like this:

Code: Select all

:theFunction
   echo the name of the function is ???
goto:eof


thanks in advance, pumi