Search found 15 matches
- 23 Aug 2010 02:01
- Forum: DOS Batch Forum
- Topic: bat script to find file name in a file
- Replies: 10
- Views: 10890
Re: bat script to find file name in a file
my bad...here is the code from sample file called a.asp <html> <!-- #include virtual="/CAT/inc\check_site_avail.asp" --> <!-- #include virtual="/CAT/inc\CTranslate.asp" --> <!-- #include virtual="/CAT/PerfTst/PerfLogCookies.asp"--> </html> How should I go ahead. I want ...
- 20 Aug 2010 01:10
- Forum: DOS Batch Forum
- Topic: bat script to find file name in a file
- Replies: 10
- Views: 10890
Re: bat script to find file name in a file
ok...we generally include file names in anchor tags...but there are other ways of doing it also apart from anchor tags..like <# include...>
Cant we search for .asp in a line and then take out the filename?
Cant we search for .asp in a line and then take out the filename?
- 17 Aug 2010 23:01
- Forum: DOS Batch Forum
- Topic: bat script to find file name in a file
- Replies: 10
- Views: 10890
bat script to find file name in a file
Hello All, It's been a while since my last question. I have 1 now so here it goes: I want to write a bat file that will loop through a folder (and also sub-folders in it) and read each file. File can be of any type..mostly ASP and html. It should read all lines and find anything which ends with .asp...
- 19 Jul 2010 00:38
- Forum: DOS Batch Forum
- Topic: ISQL help in DOS
- Replies: 7
- Views: 8558
Re: ISQL help in DOS
Thanks everyone for their timely reply. I am going ahead with aGerman's suggestion as my output to the file is being appended. So, not sure anymore if it will be at line 3.
Thanks again.
Thanks,
Meet
Thanks again.
Thanks,
Meet
- 16 Jul 2010 08:19
- Forum: DOS Batch Forum
- Topic: ISQL help in DOS
- Replies: 7
- Views: 8558
Re: ISQL help in DOS
I was able to remove "1 rows effected". Can we modify the file and pick up only data into variable. I know it will always be at line 3
- 16 Jul 2010 08:14
- Forum: DOS Batch Forum
- Topic: ISQL help in DOS
- Replies: 7
- Views: 8558
Re: ISQL help in DOS
Thanks for response. But -h-1 is not working
- 16 Jul 2010 07:58
- Forum: DOS Batch Forum
- Topic: ISQL help in DOS
- Replies: 7
- Views: 8558
ISQL help in DOS
Hi All, I am trying to execute a query using ISQL. Query is written in different file. Below is the command I used: isql -U <user> -P <pwd> -S <server> -D <database> -i d:\apps\cat\sql\cit_feed_getCOB.sql -o d:\apps\cat\dat\cit_date.dat Output in cit_date.dat is: -------- 20100715 (1 row affected) B...
- 24 Jun 2010 23:16
- Forum: DOS Batch Forum
- Topic: environment variable is blank
- Replies: 9
- Views: 9724
Re: environment variable is blank
Hello aGerman, Indeed it's strange. I ran set command in cmd and I can see the variable and it's value. Btw: Is there a command line in your batch file similar to this?: set GLOBENV_CAT_OUTDIR_ARCHIVE_GV= Nope, not setting this variable anywhere in the file However, it's production system and I can'...
- 23 Jun 2010 23:01
- Forum: DOS Batch Forum
- Topic: environment variable is blank
- Replies: 9
- Views: 9724
Re: environment variable is blank
wait next call according to time schedule... It already ran 3 times (3 days) but the variable is still showing up as <blank> in log files To that extent I've understood correctly, your batch file will never end or start new. In this case you can't work with a global variable which would change duri...
- 23 Jun 2010 06:20
- Forum: DOS Batch Forum
- Topic: environment variable is blank
- Replies: 9
- Views: 9724
Re: environment variable is blank
Sorry for my ignorance but how do I restart .bat file (double click on it manually?)? It's production environment so I have to be careful.
- 23 Jun 2010 04:28
- Forum: DOS Batch Forum
- Topic: environment variable is blank
- Replies: 9
- Views: 9724
Re: environment variable is blank
How to restart cmd. There is no cmd running on that computer. A scheduler job calls .bat file at specific times. That's all. I am not setting this variable in bat file only using it.
Thanks,
Meet
Thanks,
Meet
- 23 Jun 2010 03:00
- Forum: DOS Batch Forum
- Topic: environment variable is blank
- Replies: 9
- Views: 9724
environment variable is blank
Hi All, I created one environment variable from My computer->properties->advanced->Environment variables->system variables. Problem is: This compute is used for running bat files to process feeds and never shuts down. I just added this new variable in the bat file. When this bat file is called, this...
- 15 Jun 2010 05:27
- Forum: DOS Batch Forum
- Topic: Addition of days
- Replies: 5
- Views: 10507
Re: Addition of days
Thanks a lot amel27. That was really helpful.
Thanks,
Meet
Thanks,
Meet
- 15 Jun 2010 02:04
- Forum: DOS Batch Forum
- Topic: Addition of days
- Replies: 5
- Views: 10507
Re: Addition of days
@aGerman Thanks a lot for the reply. I will visit the site and see. @amel27 Thanks!!! That worked. I am still a rookie into batch programming. Can you please tell me what exactly are we doing here? call :dayadd +2 echo [now+2] %$d% %$t%& pause >nul call :dayadd -2 echo [now-2] %$d% %$t%& pau...
- 14 Jun 2010 07:14
- Forum: DOS Batch Forum
- Topic: Addition of days
- Replies: 5
- Views: 10507
Addition of days
Hello All, Hope everyone is doing well. Had a question so joined the forum. Here goes: I am currently appending date and time to a file name. I recently got a requirement to add/subtract 2 days and then append it. Questions: 1. Do we have any inbuilt date function in DOS? 2. I tried to split the dat...