Search found 4315 matches

by Squashman
07 Jun 2012 07:37
Forum: DOS Batch Forum
Topic: Replacing the last occurrence of char on every line of file
Replies: 6
Views: 5157

Re: Replacing the last occurrence of char on every line of f

Then why not just use sed to do this as well.
by Squashman
06 Jun 2012 05:46
Forum: DOS Batch Forum
Topic: How to sequence two file conversion commands?
Replies: 9
Views: 8045

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&...
by Squashman
06 Jun 2012 05:42
Forum: DOS Batch Forum
Topic: Batch Script to Toggle Numlock?
Replies: 4
Views: 5290

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.
by Squashman
05 Jun 2012 06:14
Forum: DOS Batch Forum
Topic: what's wrong with this loop
Replies: 3
Views: 3271

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...
by Squashman
05 Jun 2012 05:58
Forum: DOS Batch Forum
Topic: How to list directory file and size; including subdirs
Replies: 21
Views: 17328

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

Code: Select all

for /f "tokens=1* delims=. " %%A in ('sort /r /rec 15 unsorted.txt') do echo %%A %%B
by Squashman
05 Jun 2012 05:36
Forum: DOS Batch Forum
Topic: DOS and VBScript - A Better Interaction?
Replies: 18
Views: 15140

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.
by Squashman
04 Jun 2012 16:00
Forum: DOS Batch Forum
Topic: How to list directory file and size; including subdirs
Replies: 21
Views: 17328

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.
by Squashman
04 Jun 2012 15:31
Forum: DOS Batch Forum
Topic: How to list directory file and size; including subdirs
Replies: 21
Views: 17328

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.
by Squashman
04 Jun 2012 13:14
Forum: DOS Batch Forum
Topic: **Dialog pop-up box after Install**
Replies: 21
Views: 16942

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 (&).
by Squashman
04 Jun 2012 13:06
Forum: DOS Batch Forum
Topic: How to list directory file and size; including subdirs
Replies: 21
Views: 17328

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.
by Squashman
04 Jun 2012 07:00
Forum: DOS Batch Forum
Topic: error in for loop
Replies: 18
Views: 12734

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. :?:
by Squashman
04 Jun 2012 06:51
Forum: DOS Batch Forum
Topic: DOS and VBScript - A Better Interaction?
Replies: 18
Views: 15140

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...
by Squashman
03 Jun 2012 13:45
Forum: DOS Batch Forum
Topic: DOS and VBScript - A Better Interaction?
Replies: 18
Views: 15140

Re: DOS and VBScript - A Better Interaction?

You might as well learn Powershell then.
by Squashman
03 Jun 2012 08:41
Forum: DOS Batch Forum
Topic: error in for loop
Replies: 18
Views: 12734

Re: error in for loop

Delayed expansion is his achillies heel.

Not using it in the last for loop either.