Search found 6 matches

by Chronofos
08 Apr 2024 01:11
Forum: DOS Batch Forum
Topic: DONT WORK: string input / if construct: output part of string with variable
Replies: 1
Views: 304

DONT WORK: string input / if construct: output part of string with variable

Hello, I'm asking for help because I can't get any further on my own. I'm trying to take part of an input string (string: ~0.1%) and create a query using if-else-construct. And it works correctly with (Input "1" as first character) @echo off cls setlocal enabledelayedexpansion SET /p "string=Insert ...
by Chronofos
25 Mar 2024 03:35
Forum: DOS Batch Forum
Topic: Skip lines in a text file from top and bottom with query
Replies: 0
Views: 1125

Skip lines in a text file from top and bottom with query

I'm currently trying to learn how to work with batch files using various tutorials. During the "battle" with the FOR loop, I came across several times that the skip parameter only cuts off the lines from the top. I tried to write a batch program that also trims the bottom lines. A kind of skip area....
by Chronofos
23 Mar 2024 12:15
Forum: DOS Batch Forum
Topic: if/elseif dont work like expected...Sorry, this time in English
Replies: 3
Views: 767

Re: if/elseif dont work like expected...Sorry, this time in English

Hi OJBakker!
Thank you for your quick and competent help! You've helped me a lot.
by Chronofos
22 Mar 2024 17:38
Forum: DOS Batch Forum
Topic: if/elseif dont work like expected...Sorry, this time in English
Replies: 3
Views: 767

if/elseif dont work like expected...Sorry, this time in English

Within a "project" I wrote a batch suboutine, which should display help text and catch errors when calling it. if "%1"=="/help" ( ECHO Ausgabe Hilfe cmd /k ) else if NOT exist %1 ( ECHO Datei existiert nicht^! Abbruch^! cdm /k ) else if "%~x1"=="" ( ECHO Keine DateiErweiterung^! Abbruch^! cdm /k ) e...
by Chronofos
17 Mar 2024 00:39
Forum: DOS Batch Forum
Topic: Need Help: CALL subroutine in Batch dont worl like expected
Replies: 2
Views: 796

Re: Need Help: CALL subroutine in Batch dont worl like expected

Hi! Thanks for your answer! This was one of my errors. I have found one more and the batchfile rewritten. Now it works. @ECHO OFF CLS ECHO ------------------------------------------------------------------ ECHO Output "Normal" ECHO ------------------------------------------------------------------ E...
by Chronofos
16 Mar 2024 11:20
Forum: DOS Batch Forum
Topic: Need Help: CALL subroutine in Batch dont worl like expected
Replies: 2
Views: 796

Need Help: CALL subroutine in Batch dont worl like expected

Hi1 I dont understand why my bachtfile dont work. -----BATCH FILE ----- @ECHO OFF CLS ECHO AUSGABE "Normal" ECHO %1 ECHO %~d1 ECHO %~p1 ECHO %~n1 ECHO %~x1 ECHO Zusammengesetzt ECHO %~d1%~p1%~n1%~x1 ECHO. CALL :get_drive_path_name_extension_from_file GOTO :EOF :get_drive_path_name_extension_from_fil...