Search found 17 matches

by Rajnishjc_27
19 Sep 2019 05:19
Forum: DOS Batch Forum
Topic: how to check file exists or not : batch script
Replies: 2
Views: 366

how to check file exists or not : batch script

hi all,

how to check file exists or not in folder with IF...Else condition.
please help
by Rajnishjc_27
19 Sep 2019 04:26
Forum: DOS Batch Forum
Topic: get File Size batch script.
Replies: 2
Views: 353

get File Size batch script.

HI

Which command to get or read size of the file from particular folder.
like its kb or mb.
by Rajnishjc_27
12 Sep 2019 00:58
Forum: DOS Batch Forum
Topic: Sorting text file content with batch script,.
Replies: 5
Views: 513

Re: Sorting text file content with batch script,.

Thank you so much PenPen for your kind help.
by Rajnishjc_27
10 Sep 2019 04:10
Forum: DOS Batch Forum
Topic: Sorting text file content with batch script,.
Replies: 5
Views: 513

Re: Sorting text file content with batch script,.

Thank you Penpen,

one more need help , not i need only first record return ?

"201804211030-ScottsDDSupplier.csv"
"201804180930-ScottsDDSupplier.csv"
"201804170930-ScottsDDSupplier.csv"
by Rajnishjc_27
10 Sep 2019 03:08
Forum: DOS Batch Forum
Topic: Sorting text file content with batch script,.
Replies: 5
Views: 513

Sorting text file content with batch script,.

Hi I have data in filelist.TXT file as below. "201804170930-ScottsDDSupplier.csv" "201804180930-ScottsDDSupplier.csv" "201804211030-ScottsDDSupplier.csv" i need to sorting in Descending order when i read file as below.. @echo off setlocal enableExtensions disableDelayedExpansion set file=D:\filelist...
by Rajnishjc_27
27 Aug 2019 03:23
Forum: DOS Batch Forum
Topic: SCRIPT help. for syntex problem
Replies: 4
Views: 1052

Re: SCRIPT help. for syntex problem

ShadowThief wrote:
27 Aug 2019 03:08
Without seeing the context that this snippet is in, it's impossible to say. Please post all of the code.
code as below

@echo off
set rc=1

if !rc! equ 1 goto error

:error
echo Failed with validation #%1%.
SET %~2=!rc!
exit /b

am getting blank in arguments 2 , instead of 1
by Rajnishjc_27
27 Aug 2019 01:02
Forum: DOS Batch Forum
Topic: SCRIPT help. for syntex problem
Replies: 4
Views: 1052

SCRIPT help. for syntex problem

Hi.

if !rc! equ 1 goto error

:error
echo Failed with validation #%1%.
SET %~2=!rc!
exit /b

but my SET "%~2=!rc!" output parameter not return anything, it should return 1

help...
by Rajnishjc_27
26 Aug 2019 21:46
Forum: DOS Batch Forum
Topic: string not working
Replies: 3
Views: 913

Re: string not working

Hi Steffen

Then how it should be ?
by Rajnishjc_27
26 Aug 2019 08:30
Forum: DOS Batch Forum
Topic: string not working
Replies: 3
Views: 913

string not working

hi

i am using below script which is not working

set res1='YES'

echo !res1!
if "!res1!" EQU "YES" echo "HI"

its not displaying HI , please help
by Rajnishjc_27
23 Aug 2019 07:14
Forum: DOS Batch Forum
Topic: mutiple validation in same do not working
Replies: 2
Views: 1038

mutiple validation in same do not working

Hi Frinds i have script like below for /F " skip=1 tokens=3,7 delims=;" %%a in (%file% ) do ( set token7=%%b set token3=%%a echo !token7! !token3!  it is displaing both the value if !TOKEN7! equ 0 echo(field "DIS_TYPE" = " " is Blank) if !token3! equ 0 echo(field "Reason" = " " is Blank)  but it n...
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: 1333

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: 1131

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: 1077

.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: 2240

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...