Search found 4314 matches
- 07 Jun 2012 07:37
- Forum: DOS Batch Forum
- Topic: Replacing the last occurrence of char on every line of file
- Replies: 6
- Views: 5067
Re: Replacing the last occurrence of char on every line of f
Then why not just use sed to do this as well.
- 06 Jun 2012 05:46
- Forum: DOS Batch Forum
- Topic: How to sequence two file conversion commands?
- Replies: 9
- Views: 8011
Re: How to sequence two file conversion commands?
I think batch files can't "recognize" directories on a server, but it might work if you map this network path to a network drive; have "\\server\project\textures" as a new drive letter, e.g., "S:\". So instead of running your batch from "\\server\project\textures&...
- 06 Jun 2012 05:42
- Forum: DOS Batch Forum
- Topic: Batch Script to Toggle Numlock?
- Replies: 4
- Views: 5262
Re: Batch Script to Toggle Numlock?
Dos_Probie wrote:BTW Fawers, I did consider posting on orginal post but after so many overwhelming responses I decided to repost.
Surely you can't be serious.
- 05 Jun 2012 06:14
- Forum: DOS Batch Forum
- Topic: what's wrong with this loop
- Replies: 3
- Views: 3141
Re: what's wrong with this loop
I am still confused by doscode's use of a TAB or his problems using a TAB. Is this a language specific issue with his version of Windows? Not sure why he is putting the delimiter into a file. File1.txt Before1 After1 Before2 After2 Before3 After3 Before4 After4 delims.bat @echo off set "tab= &q...
- 05 Jun 2012 05:58
- Forum: DOS Batch Forum
- Topic: How to list directory file and size; including subdirs
- Replies: 21
- Views: 17199
Re: How to list directory file and size; including subdirs
I like Dave's final solution. Got one addition to it and it might speed it up on a very large unsorted text file.
Just used the /REC switch
Just used the /REC switch
Code: Select all
for /f "tokens=1* delims=. " %%A in ('sort /r /rec 15 unsorted.txt') do echo %%A %%B
- 05 Jun 2012 05:36
- Forum: DOS Batch Forum
- Topic: DOS and VBScript - A Better Interaction?
- Replies: 18
- Views: 14986
Re: DOS and VBScript - A Better Interaction?
I really wasn't referring to putting powershell inside a bat. I was more going along the route of just using pure powershell. They are building in some serious speed to Version 3 of PowerShell.
- 04 Jun 2012 16:00
- Forum: DOS Batch Forum
- Topic: How to list directory file and size; including subdirs
- Replies: 21
- Views: 17199
Re: How to list directory file and size; including subdirs
Yeah. Don't redirect the output from the first for loop to a file. Just go straight to the set statements.
- 04 Jun 2012 15:31
- Forum: DOS Batch Forum
- Topic: How to list directory file and size; including subdirs
- Replies: 21
- Views: 17199
Re: How to list directory file and size; including subdirs
Wouldn't !K's solution would work in this instance since we longer have to deal with the delimiter issue he had before in his previous thread.
- 04 Jun 2012 13:14
- Forum: DOS Batch Forum
- Topic: **Dialog pop-up box after Install**
- Replies: 21
- Views: 16162
Re: **Dialog pop-up box after Install**
I don't believe you want to PIPE the output of those commands to the next command.
I believe what you meant to use was the AMPERSAND (&).
I believe what you meant to use was the AMPERSAND (&).
- 04 Jun 2012 13:06
- Forum: DOS Batch Forum
- Topic: How to list directory file and size; including subdirs
- Replies: 21
- Views: 17199
Re: How to list directory file and size; including subdirs
%~zI - expands %I to size of file You will probably have to create a text file of all your output first and then use the same code as you did last time to sort them in size order, because I believe the sort function of DIR will sort by the size of each file in each folder instead of the whole output.
- 04 Jun 2012 07:00
- Forum: DOS Batch Forum
- Topic: error in for loop
- Replies: 18
- Views: 12517
Re: error in for loop
If you already new that the N and X were for the file name and extension why didn't you just take the X out in the first place? Scratch my head on that one.
- 04 Jun 2012 06:51
- Forum: DOS Batch Forum
- Topic: DOS and VBScript - A Better Interaction?
- Replies: 18
- Views: 14986
Re: DOS and VBScript - A Better Interaction?
You pretty much have full access to the .NET Libraries. Sapien Technologies used to have a Free Download of their Primal Tools that helped you make GUI for your PowerShell scripts. I used it for a while a few years ago just to learn the basics of what libraries I needed to use to make different inte...
- 03 Jun 2012 13:45
- Forum: DOS Batch Forum
- Topic: DOS and VBScript - A Better Interaction?
- Replies: 18
- Views: 14986
Re: DOS and VBScript - A Better Interaction?
You might as well learn Powershell then.
- 03 Jun 2012 08:41
- Forum: DOS Batch Forum
- Topic: error in for loop
- Replies: 18
- Views: 12517
Re: error in for loop
Delayed expansion is his achillies heel.
Not using it in the last for loop either.
Not using it in the last for loop either.
- 02 Jun 2012 20:45
- Forum: DOS Batch Forum
- Topic: how to replace all occurrences of ;;;; with ; in a string
- Replies: 36
- Views: 25279
Re: how to replace all occurrences of ;;;; with ; in a strin
Aacini wrote:PS - Did you realize that original topic requested to change semicolons, not commas
The thread title shows semi colons but his initial question showed commas for the example and he even said commas.