Search found 21 matches

by Rajnishjc_27
22 Aug 2019 04:27
Forum: DOS Batch Forum
Topic: Batch Script : Space issue with text file to remove
Replies: 1
Views: 4322

Batch Script : Space issue with text file to remove

Hi Friends, I have a data like below in .TXT file id name Add 1 ; Severe weather - snow In 2 ; ; now in my 2 id name is blank, now how to check blank field or avoid or length of the of the field in below batch script. setlocal enabledelayedexpansion for /F " skip=1 tokens=2 delims=;" %%b in (%file% ...
by Rajnishjc_27
21 Aug 2019 23:05
Forum: DOS Batch Forum
Topic: Batch Script Remove Space from Text Field.
Replies: 2
Views: 5380

Batch Script Remove Space from Text Field.

Hi Friends, I have a data like below in .TXT file. Id Name Address CurrierNo 001 XYX Mum M 123 002 ZZZ Bom B 456 and i have use script as below. for /f " skip=1 tokens=4 delims=; " %%c in (%file% ) do ( setlocal enabledelayedexpansion SET "string1=%%c" & CALL D:\Rajnish_GTT\isnumeric.bat result1 !st...
by Rajnishjc_27
21 Aug 2019 00:21
Forum: DOS Batch Forum
Topic: .Bat File calling with other .bat file with paramater isue
Replies: 2
Views: 4702

.Bat File calling with other .bat file with paramater isue

Hi Friends, I have Script below in one .bat file and am calling other .bat file which contained the function but it is not working. -------Bat1.bat @echo off setlocal enableExtensions disableDelayedExpansion set file=D:\Rajnish_GTT\R1Test.txt for /f "tokens=1 delims=, " %%a in (%file% ) do ( setloca...
by Rajnishjc_27
19 Aug 2019 00:33
Forum: DOS Batch Forum
Topic: How to validate digit number from .txt file
Replies: 8
Views: 9635

Re: How to validate digit number from .txt file

Hi PenPen/All i need multiple validation first column example like below. Id A002 003 B0000006 10000002 First Numeric validation is working, also but need to check other validation same fields 'ID' i need Both validation in One loop as below like Field --- 'A002' ' --> Not Nnumeric.' Field --- '1000...
by Rajnishjc_27
18 Aug 2019 01:24
Forum: DOS Batch Forum
Topic: How to validate digit number from .txt file
Replies: 8
Views: 9635

Re: How to validate digit number from .txt file

Thanks PenPen for the instant reply.

one more logic needed on the same,
if i want check size of the fields value with 'IF' condition which syntax need to be use.

example.
Name
Rajnish
Alpesh
ABCDEFGH

if length(Name) > 6 then echo 'not more then 6 digit'

Kindly help..
by Rajnishjc_27
16 Aug 2019 23:41
Forum: DOS Batch Forum
Topic: How to validate digit number from .txt file
Replies: 8
Views: 9635

How to validate digit number from .txt file

Hi Friends, I have .TXT file and data as below ID , Name, Address 001 , ABC , USA 002 ,XYZ , SNG A003,PQR,UK Now i have read each line from .txt file and put validation on ID field as it should be digit. Example : if id<>numeric then throw message like echo 'field is not numeric' please help to writ...