Search found 126 matches
- 16 Aug 2011 09:56
- Forum: DOS Batch Forum
- Topic: A better way to build an HTML Index of files?
- Replies: 24
- Views: 19440
Re: A better way to build an HTML Index of files?
Sadly... I tried both the % % and the un-indent methods and they both resulted in the bug. But I took this a step further and got to a point where the bug does not occurr.... I removed each line from the top down and ran the script. Here is what I ended up with: ( FOR /F "tokens=*"%%a in (...
- 16 Aug 2011 09:30
- Forum: DOS Batch Forum
- Topic: A better way to build an HTML Index of files?
- Replies: 24
- Views: 19440
Re: A better way to build an HTML Index of files?
Thanks again, I edited my code above with the changes
- 16 Aug 2011 08:21
- Forum: DOS Batch Forum
- Topic: A better way to build an HTML Index of files?
- Replies: 24
- Views: 19440
Re: A better way to build an HTML Index of files?
Dave, I edited my last post to post the full working version. If you change the FOR %%a section back to what I posted yesterday and then apply the "fixes" you should see the same thing I saw. I added % % prior to every line except the following: ) DO ( And I am certain it was in my header ...
- 16 Aug 2011 07:21
- Forum: DOS Batch Forum
- Topic: A better way to build an HTML Index of files?
- Replies: 24
- Views: 19440
Re: A better way to build an HTML Index of files?
What I found... The % % trick should work... But I still encounter the bug. Indenting to one space and using %NL% to escape it should work... But I still encounter the bug. Skipping the /F all together and just using FOR %%a IN ( worked, but it hosed my header and footer... EDIT: Fixed... I removed ...
- 15 Aug 2011 16:41
- Forum: DOS Batch Forum
- Topic: A better way to build an HTML Index of files?
- Replies: 24
- Views: 19440
Re: A better way to build an HTML Index of files?
I thought I did use your example... But I used Jebs incase I needed support for ? and *. I will try the % % trick and replace the style quotes with singles and see if that resolves the problem and if not, I will go with the FOR loop. I thought you could only use FOR with a file set and to utilize a ...
- 15 Aug 2011 16:14
- Forum: DOS Batch Forum
- Topic: Changing value of a specific field based on a diff field
- Replies: 3
- Views: 3755
Re: Changing value of a specific field based on a diff field
That's a good solution aGerman, and the same one I came up with working on this a few weeks ago: http://www.dostips.com/forum/viewtopic.php?f=3&t=2058 As far as where to learn, here is a great place, just ask what !field2:~1! means and you'll get an answer. It's removing the 1st character from t...
- 15 Aug 2011 15:38
- Forum: DOS Batch Forum
- Topic: ☺?♥♠a♀???☻?☻ for weirdness ♠☺??↨??$error = 7 niet vinden.
- Replies: 30
- Views: 34257
Re: ☺?♥♠a♀???☻?☻ for weirdness ♠☺??↨??$error = 7 niet vind
I've run into this now too But all my lines are quoted so I REALLY should not be running into it. It's intermittent too which is scary. Sometimes it happens when I build my HTML header, sometimes the footer, sometimes both and sometimes neither. I only found it because I was testing out the macro-iz...
- 15 Aug 2011 15:32
- Forum: DOS Batch Forum
- Topic: A better way to build an HTML Index of files?
- Replies: 24
- Views: 19440
Re: A better way to build an HTML Index of files?
Posting the code here, because I am about to reference it in another thread... ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: %== Building HTML Header Information ==% ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: SET ROWCOLOR=ffffff SET FILENUMBER=0 ECHO: > &qu...
- 15 Aug 2011 10:55
- Forum: DOS Batch Forum
- Topic: Jdate2date macro - missing operand?
- Replies: 2
- Views: 3437
Re: Jdate2date macro - missing operand?
Arrrghh! I feel like Maxwell Smart. But at least I learned things... Set /a will expand variables on it's own, Sometimes you don't want it to, and enclosing your SET statement in "" allows you to get rid of unsightly escape characters I can finally get rid of those 65 lines of functions fi...
- 11 Aug 2011 14:10
- Forum: DOS Batch Forum
- Topic: Send data over internet using TCP connection...
- Replies: 2
- Views: 3712
Re: Send data over internet using TCP connection...
Unfortunately Telnet does not utilize scripts. FTP can though, and you could theoretically setup a batch file that would accept input, save as a text file, upload to an FTP site, then sit and routinely check the FTP site for a response text file. Without utilizing 3rd party software, that's the only...
- 11 Aug 2011 13:53
- Forum: DOS Batch Forum
- Topic: Jdate2date macro - missing operand?
- Replies: 2
- Views: 3437
Jdate2date macro - missing operand?
macro.Jdate works correctly, but macro.Jdate2Date gives a "missing operand" error, but finishes and provides the wrong date. I copied the formulas from here: m @ECHO OFF &Setlocal DisableDelayedExpansion ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: %== Setting LF =...
- 11 Aug 2011 11:56
- Forum: DOS Batch Forum
- Topic: Manipulating directory string
- Replies: 7
- Views: 6804
Re: Manipulating directory string
I'll agree that Ed's code is usually more complex than needs to be to solve the task... However... I don't see Dave's code as any more complex than yours. Condensing something down to 1 line != simplifying. You're code will not work if they include a \ at the end of the directory listing, while push...
- 10 Aug 2011 16:49
- Forum: DOS Batch Forum
- Topic: How do i make a text file with text in it with CMD
- Replies: 14
- Views: 12020
Re: How do i make a text file with text in it with CMD
Right now i don't need that type of code because i only need a line of the file... I kind of didn't get the code but I'll try to understand it later(it WILL be useful) I fixed that for you. That code loops through every line of "text file path" and for each line in the file it sets %%a to...
- 10 Aug 2011 16:33
- Forum: DOS Batch Forum
- Topic: Batch+ Project
- Replies: 61
- Views: 45532
Re: Batch+ Project
What are you trying to say?? That I did the same thing you're doing. And then I decided it would be more fun to play with friends and have a living breathing world that went on about it's business whether I was connected to it or not. It was a fun learning experience at the time and while DOS was n...
- 10 Aug 2011 14:20
- Forum: DOS Batch Forum
- Topic: Batch File performance - For Vs. Call
- Replies: 6
- Views: 5607
Re: Batch File performance - For Vs. Call
I used /A-D to get rid of one of the pipes also.