Search found 13 matches

by dukdpk
30 Mar 2011 00:52
Forum: DOS Batch Forum
Topic: Question about IF
Replies: 4
Views: 5234

Re: Question about IF

Hi aGerman

It works. Many thanks.
by dukdpk
28 Mar 2011 01:28
Forum: DOS Batch Forum
Topic: show files without extension
Replies: 3
Views: 16611

Re: show files without extension

hi aGerman

It works. thank you.

for /f "delims=" %%a in ('dir /a-d /b "E:\MyProgramme\*.exe"') do echo %%~na
by dukdpk
28 Mar 2011 01:07
Forum: DOS Batch Forum
Topic: Question about IF
Replies: 4
Views: 5234

Re: Question about IF

Hi aGerman It works. Thank you. Could you explain, when assume 1,2,3 and 4 options are become as a001, a003, a006, a001-a006 how will be the code changed? i.e. @echo off &setlocal :menu cls echo a001 Generate report staff echo a003 Generate report subjects echo a006 Generate report class echo a0...
by dukdpk
25 Mar 2011 01:00
Forum: DOS Batch Forum
Topic: show files without extension
Replies: 3
Views: 16611

show files without extension

Hi All E:\MyProgramme contains number of files with different extensions. I want to show only all files with .exe , Please note that display file name only. Not display extension(i.e. .exe ). Please advice me how to write bat file for above requirement. I tried following one but display files with f...
by dukdpk
25 Mar 2011 00:12
Forum: DOS Batch Forum
Topic: Question about IF
Replies: 4
Views: 5234

Question about IF

Hi All Please go through following bat file. @echo off :menu 1 Generate report staff 2 Generate report subjects 3 Generate report class 4 exit echo. set /p sample=Type option: if "%sample%"=="1" call r1.bat if "%sample%"=="2" call r2.bat if "%sample%"...
by dukdpk
24 Mar 2011 22:11
Forum: DOS Batch Forum
Topic: IF not condition
Replies: 1
Views: 3113

Re: IF not condition

Got the answer. answer is, @echo off :menu 1 Generate report staff 2 Generate report subjects 3 Generate report class 4 exit echo. set /p sample=Type option: if "%sample%"=="1" call r1.bat if "%sample%"=="2" call r2.bat if "%sample%"=="3" c...
by dukdpk
24 Mar 2011 03:38
Forum: DOS Batch Forum
Topic: IF not condition
Replies: 1
Views: 3113

IF not condition

Hi All when run Menu.bat file, it asks about select the option? options are as follows 1 Generate report staff 2 Generate report subjects 3 Generate report class 4 exit My requirment is that when user enter incorrect option(i.e. not between 1 and 4) , I want to display message something like "y...
by dukdpk
21 Mar 2011 23:07
Forum: DOS Batch Forum
Topic: IF EXIST Statement
Replies: 0
Views: 5400

IF EXIST Statement

Hi All I want to modify following bat file based on number of requirements. My requirments are, When user enter database name, have to check entered database name in the C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data. If it is exist then do, for %%a in (R0001.bat R0002.bat R0003.bat R0004....
by dukdpk
17 Mar 2011 04:07
Forum: DOS Batch Forum
Topic: How to give different font colors in bat file
Replies: 4
Views: 15407

How to give different font colors in bat file

Hi All I want to give different font colours for some of the texts in bat file. Please look at the following bat file. @echo off echo List of Reports echo Staff List echo Responsible Works pause I want to give red colour for "List of Report" text and green colour for both "Staff List&...
by dukdpk
16 Mar 2011 23:05
Forum: DOS Batch Forum
Topic: Open Excel file using Bat file
Replies: 1
Views: 5517

Open Excel file using Bat file

Hi All I have following bat file. I want to open some of the excel files. This task must go under Select a task title by giving echo 6) Sample Reports. when Select 6, then have to display list of Sample reports. Then user is able to give option to open for particular excel file. Path for each excel ...
by dukdpk
11 Mar 2011 02:34
Forum: DOS Batch Forum
Topic: bat file output to pdf
Replies: 3
Views: 5002

bat file output to pdf

Hi All

how to get bat file out put to pdf format. Are there any possibility to get bat file out put to pdf one by modifying following code.

@echo off
sqlcmd -S MY-PC1\SQLExpress -d TEST_2011 -i E:\r1.sql -o E:\r1.csv -s","
echo report is generated
pause



Thank you
by dukdpk
10 Mar 2011 22:54
Forum: DOS Batch Forum
Topic: Replace text in bat files
Replies: 2
Views: 4111

Re: Replace text in bat files

Hi aGerman

I tried your code. It works. Many thanks
by dukdpk
10 Mar 2011 03:58
Forum: DOS Batch Forum
Topic: Replace text in bat files
Replies: 2
Views: 4111

Replace text in bat files

Hi All I have set of bat files. all bat file contain 'TEST_2011' text. I want to replace TEST_2011 with TEST_2012. My bat files names are r1.bat,r2.bat,r3.bat and r4.bat. Thing is I want to replace new text in all bat files at once. I tried following bat file to replace new text into bat files. But ...