Search found 9 matches

by mskavim
23 Feb 2015 12:28
Forum: DOS Batch Forum
Topic: BATCH IF is failing with syntax error
Replies: 12
Views: 8018

Re: BATCH IF is failing with syntax error

@penpen ... my apologies .... I tried with "" but missed out that little info of giving space between "BOM" and "(" .... I am so use to using, actually spoiled by IDE for C++ and Java where i don't have to worry about the syntax.... bat is real test to me ... I am using...
by mskavim
23 Feb 2015 11:53
Forum: DOS Batch Forum
Topic: BATCH IF is failing with syntax error
Replies: 12
Views: 8018

Re: BATCH IF is failing with syntax error

I removed all the brackets like you guys suggested.... but still IF condition is failing...... I printed the "%EXPORT_TYPE%" before the IF check and the value is BOM... hmmm...i am close to give up.... SET /P TC_USER="Enter TC_USER_ID :" %ROOT_PATH%\BIN\EditV64.exe -m -p "En...
by mskavim
23 Feb 2015 10:39
Forum: DOS Batch Forum
Topic: BATCH IF is failing with syntax error
Replies: 12
Views: 8018

Re: BATCH IF is failing with syntax error

@Squashman I tried that option but still I have the same issue... this is my complete script.... @ECHO OFF @BREAK ON SETLOCAL ENABLEDELAYEDEXPANSION COLOR 3 ::--- START:TIME --- SET starttime=%time% SET _my_datetime=%date%_%time% ::------------------------------------------------------------- ::- ::...
by mskavim
23 Feb 2015 04:08
Forum: DOS Batch Forum
Topic: BATCH IF is failing with syntax error
Replies: 12
Views: 8018

BATCH IF is failing with syntax error

What is wrong in the below syntax IF %EXPORT_TYPE%=="PART" is failing with syntax error... any help is greatly appreciated.... IF NOT DEFINED ITEM_ID( SET /P ITEM_ID="Enter ITEM_ID:" ) IF NOT DEFINED REVISION_ID( SET /P REVISION_ID="Enter REVISION_ID:" ) IF NOT DEFINED ...
by mskavim
26 Jan 2015 16:00
Forum: DOS Batch Forum
Topic: How to differentiate directory vs file in loop
Replies: 21
Views: 16834

Re: How to differentiate directory vs file in loop

This worked IF "%%~aP" GEQ "d" ... I was getting sysntax error for ) when I use IF EXIST "%%P\"
by mskavim
26 Jan 2015 12:31
Forum: DOS Batch Forum
Topic: How to differentiate directory vs file in loop
Replies: 21
Views: 16834

How to differentiate directory vs file in loop

I am looping the content of a directory which has files and sub-directory. so I want to find out if it is a file or a directory. I don't want hard code name of the file or directory name in the script. FOR /f "tokens=*" %%D IN ('DIR /B /AD /ON') DO ( ECHO #---"%%D"---# CD "%...
by mskavim
25 Jan 2015 18:24
Forum: DOS Batch Forum
Topic: String Split issue in for loop... while process folders
Replies: 5
Views: 4884

Re: String Split issue in for loop... while process folders

@Squahman - I am a rookie in batch scripting.... so my apologies for any stupid mistakes :) ...!VAR! works thanks a lot!.
by mskavim
25 Jan 2015 17:23
Forum: DOS Batch Forum
Topic: String Split issue in for loop... while process folders
Replies: 5
Views: 4884

Re: String Split issue in for loop... while process folders

I tried this ....but still I see the same issue..... :LOAD_SUB SETLOCAL ENABLEDELAYEDEXPANSION ECHO. SET CURRENT_DIR=%~1 REM ECHO I am processing %~1 preferences. ECHO #---"%~2":"%~1"---# CD "%~1" FOR /f "tokens=*" %%P IN ('DIR /B *') DO ( :: IF EXIST *.xml( E...
by mskavim
25 Jan 2015 15:22
Forum: DOS Batch Forum
Topic: String Split issue in for loop... while process folders
Replies: 5
Views: 4884

String Split issue in for loop... while process folders

Hello Everybody, I am problem splinting the string in a loop. I have a subroutine (:STRING_SPLIT ) that splits the string by delimiter and return the split value. But the returned value is empty. So for the debug purpose I called ":STRING_SPLIT" in another wrapper subroutine ":SPLIT_W...