Neat! I didn't even know about cscript. But I did want to stay at a 'pure' dos level if possible.
To make ping safer, you mean to explicitly specify where the exe is vs letting the path determine the location?
Search found 384 matches
- 16 Jul 2013 21:29
- Forum: DOS Batch Forum
- Topic: Run Batch File at Specific Time
- Replies: 7
- Views: 9465
- 16 Jul 2013 14:45
- Forum: DOS Batch Forum
- Topic: CSV to QIF Using Batch?
- Replies: 9
- Views: 9328
CSV to QIF Using Batch?
I did a bunch of searches for this, but it seems like like nobody has really thought of putting these two together. I've been doing some scouring on the Internet and ran into the wonderful code on dostips to help me with some of the conversions details. So has no one really tried doing this before?
- 16 Jul 2013 14:41
- Forum: DOS Batch Forum
- Topic: A different method to trim spaces from a string
- Replies: 16
- Views: 19122
Re: A different method to trim spaces from a string
I found a really quick and dirty way to trim spaces from a for variable by using %~nF. Even though ~n is reserved for filenames, it does a great job of stripping out white space. This one-liner will take care of both left and right trimming of spaces: ----------begin screen capture--------- C:\CMD>...
- 16 Jul 2013 14:39
- Forum: DOS Batch Forum
- Topic: Run Batch File at Specific Time
- Replies: 7
- Views: 9465
Run Batch File at Specific Time
I needed something to do this that was pure command line DOS, so I made this. I'm looking for feedback for any improvements.
Code: Select all
:START
PING -n 60 127.0.0.1 > NUL
SET CURTIME=%TIME:~0,-6%
IF NOT "%CURTIME%"=="10:00" GOTO START
CODE TO EXECUTE
- 16 Jul 2013 12:41
- Forum: DOS Batch Forum
- Topic: Batch ffmpeg auto convert
- Replies: 14
- Views: 17325
Re: Batch ffmpeg auto convert
I hate to bump such an old thread, but I have to add some experience that I used in the late 1990s for mass converting mp3s. What I had created was a n-scalable batch file for mass parallel encoding files. So you have a source batch file on a file server with your files to be encoded. This batch fil...
- 16 Jul 2013 12:32
- Forum: DOS Batch Forum
- Topic: Task Scheduler Isn't Running Bat File Correctly
- Replies: 11
- Views: 14624
Re: Task Scheduler Isn't Running Bat File Correctly
OK, I simplified my bat script to only map drive "S" instead of the rest of the actions. You see below how I map the drive...It states that it's already in use, even though it doesn't appear it's being used anywhere. C:\Users\fred\Downloads\BAT-Files>NET USE S: \\SERVER\netty\star /persis...
- 16 Jul 2013 12:20
- Forum: DOS Batch Forum
- Topic: A different method to trim spaces from a string
- Replies: 16
- Views: 19122
Re: A different method to trim spaces from a string
I found a really quick and dirty way to trim spaces from a for variable by using %~nF. Even though ~n is reserved for filenames, it does a great job of stripping out white space.
- 16 Jul 2013 12:17
- Forum: DOS Batch Forum
- Topic: open url from DOS
- Replies: 1
- Views: 3311
Re: open url from DOS
The only way I could think of doing that is if you could somehow run a second instance of the browser. I don't know, but there may be a way to feed an html file to start with the target parameter in there. Try that and see what happens.
- 16 Jul 2013 12:15
- Forum: DOS Batch Forum
- Topic: Command 'grep' and 'awk'
- Replies: 3
- Views: 5075
Re: Command 'grep' and 'awk'
grep and awk are both unix commands so they don't work in dos. Now, I know there are "unix-for-dos" libraries out there that will add these features to dos. Then you can just use your script as is.