Search found 10 matches
- 29 May 2008 20:32
- Forum: DOS Batch Forum
- Topic: remove a square
- Replies: 3
- Views: 9099
Re: remove a square
Not sure what you mean by 'square'. Is it a special character look like a square? Your copy command should not append anything extra. Have you check the file size of the result is the sum of the size of the three source files? -Frank Hi All, I'm new to dos batch files and am only using to append fil...
- 29 May 2008 20:24
- Forum: DOS Batch Forum
- Topic: loop works (almost) but I need "nested" output
- Replies: 2
- Views: 7589
Re: loop works (almost) but I need "nested" output
Davep, Here is my prototype is the command prompt, you should be able to convert it into a script. To print initial spaces, use echo. instead just echo c:\>echo ^<Markers^> & for /f %i in (x.txt) do @(echo. ^Marker & echo. Time="%i" & echo. Value="%i" &...
- 29 May 2008 19:49
- Forum: DOS Batch Forum
- Topic: Any one-liner script to determine leap year?
- Replies: 4
- Views: 12405
- 26 May 2008 20:45
- Forum: DOS Batch Forum
- Topic: Any one-liner script to determine leap year?
- Replies: 4
- Views: 12405
- 26 May 2008 10:09
- Forum: DOS Batch Forum
- Topic: map and lookup - please explain
- Replies: 2
- Views: 7880
Jeb, Thanks for the detailed explaination. Should I interpret *xx as 'a regular expression to match anything up to xx' rather than 'first occurence of xx'? -Frank %var:*xx=yy% only replaces the first occurence of xx with yy in var, and the results begins with the first occurence (removing of the fro...
- 25 May 2008 11:42
- Forum: DOS Batch Forum
- Topic: Any one-liner script to determine leap year?
- Replies: 4
- Views: 12405
Any one-liner script to determine leap year?
I can determine whether it is leap year in couple of lines of batch script(witout using &) and most other scripting language support one-liner equation to determine whether it is leap year. But I cannot figure out how to do this in dos batch script since DOS does not support operator like (a == ...
- 25 May 2008 09:48
- Forum: DOS Batch Forum
- Topic: Approach using single script if other lang(VBS) is needed?
- Replies: 0
- Views: 8399
Approach using single script if other lang(VBS) is needed?
In some case, I want to use other scripting language(like VB script, perl, awk) to perform certain tasks that is hard to implement in DOS batch script. However, I will still need to create a DOS script to wrap around this other script so that I can run the whole thing with single command(I don't wan...
- 25 May 2008 09:22
- Forum: DOS Batch Forum
- Topic: Can I calculate a date?
- Replies: 8
- Views: 21117
Any other way without using jdate/jdate2date ?
What I want to do is to return the date 30(or any number but usually less than 90) days from today(or any specified date string like 03/07/2008). I am thinking whether to use VBScript DateAdd function but I would like to use complete DOS Batch command(if the code is simple/short enough) if possible....
- 25 May 2008 09:11
- Forum: DOS Batch Forum
- Topic: Batch script to show day of the year?
- Replies: 1
- Views: 10562
Batch script to show day of the year?
Any ideas(simpler) to calculate day of the year? What I can come up so far is to: 1. use 'map and lookup' idea by creating a string which maps the month to total number of days in previous month like: set days=01-00;02-31;03-59;04-90 ... 2. add the resulting value from month to the day value 3. adju...
- 25 May 2008 08:12
- Forum: DOS Batch Forum
- Topic: map and lookup - please explain
- Replies: 2
- Views: 7880
map and lookup - please explain
Can someone explain the example on the 'map and lookup' tips under the 'String manipulation'? m REM ---- Example 2: Translate abbreviation into full string ---- SET v=sun set map=mon-Monday;tue-Tuesday;wed-Wednesday;thu-Thursday;fri-Friday;sat-Saturday;sun-Sunday CALL SET v=%%map:*%v%-=%% SET v=%v:;...