Search found 78 matches

by Matt Williamson
27 Feb 2018 12:31
Forum: DOS Batch Forum
Topic: Store windows positions
Replies: 11
Views: 3716

Re: Store windows positions

I can't get to these from work. I'll have to take home an encrypted drive and grab them from home and hope they aren't blocked when I try to run them. Thanks for your contribution though.
by Matt Williamson
27 Feb 2018 12:30
Forum: DOS Batch Forum
Topic: Store windows positions
Replies: 11
Views: 3716

Re: Store windows positions

gustavo.lago wrote:
27 Feb 2018 11:53
I think that is not possible with DOS Batch.

Maybe this: https://github.com/adamsmith/WindowsLayoutSnapshot
This doesn't work in Windows 10. I tested it and all of the forks. Thanks for your contribution though.
by Matt Williamson
27 Feb 2018 12:29
Forum: DOS Batch Forum
Topic: Store windows positions
Replies: 11
Views: 3716

Re: Store windows positions

That's not possible using Batch. I have a rough idea how to manage it using C and Windows API but I don't want to reinvent the wheel. Try to find an existing 3rd party. Most likely you're not the only one who wants to restore the window positions ... Steffen Hi Steffan Thanks for your reply. I look...
by Matt Williamson
27 Feb 2018 08:44
Forum: DOS Batch Forum
Topic: Store windows positions
Replies: 11
Views: 3716

Store windows positions

I'm not sure if this is possible or has been previously covered. I've done some searching but haven't found anything yet. I have multiple monitors at work. 2 24" and the display from my laptop. I use all 3 of them when I'm working but I have to take my laptop with me when I'm out in the field. When ...
by Matt Williamson
29 Aug 2016 11:15
Forum: DOS Batch Forum
Topic: Add additional text to existing output file.
Replies: 2
Views: 1255

Re: Add additional text to existing output file.

Thank you Steffen. This helped me very much.
by Matt Williamson
29 Aug 2016 07:51
Forum: DOS Batch Forum
Topic: Add additional text to existing output file.
Replies: 2
Views: 1255

Add additional text to existing output file.

Awhile ago, Foxidrive helped me with some code to output some data from a file into another and show it based on a couple of parameters. The following is that code with a few modifications. @echo off setlocal enabledelayedexpansion set "xmlpath=\\server\developer\inetpub\Ftproot\XMLs" if e...
by Matt Williamson
31 May 2016 12:09
Forum: DOS Batch Forum
Topic: Align text in output file
Replies: 13
Views: 6495

Re: Align text in output file

Thank you to everyone who responded. Much appreciated.
by Matt Williamson
26 May 2016 08:28
Forum: DOS Batch Forum
Topic: Align text in output file
Replies: 13
Views: 6495

Re: Align text in output file

The first example was Dave's code on SS64. I'm playing with it now to figure out how it works but I'm not making much headway.
by Matt Williamson
26 May 2016 06:54
Forum: DOS Batch Forum
Topic: Align text in output file
Replies: 13
Views: 6495

Align text in output file

I have the following code that Foxidrive helped me with awhile ago and I want to have the output file right/left aligned. I have found 2 examples so far that seem to fit the bill but I can't figure out how to apply them to my code. Here is my code. @echo off setlocal enabledelayedexpansion set "...
by Matt Williamson
25 May 2016 07:45
Forum: DOS Batch Forum
Topic: Calling functions from a library
Replies: 5
Views: 3377

Re: Calling functions from a library

Thank you everyone that responded. I appreciate it.
by Matt Williamson
24 May 2016 12:48
Forum: DOS Batch Forum
Topic: Calling functions from a library
Replies: 5
Views: 3377

Calling functions from a library

I'm sure this has been discussed before so feel free to link me to topics. I've just been reading for a few hours and I'm not getting anywhere close to finding what I want to do by searching "Batch library" I have a batch file that I store all of my frequently used functions in and I just ...
by Matt Williamson
20 May 2016 07:26
Forum: DOS Batch Forum
Topic: Using the strLen function with my script. Please Help
Replies: 11
Views: 4159

Re: Using the strLen function with my script. Please Help

Try this:

Code: Select all

@echo off
setlocal enabledelayedExpansion
for /r . %%g in (*.*) do (
      call :strLen %%g var1
      echo Pfad ist !var1! Zeichen lang
      echo %%g
)     
set cnt=0
for %%A in (*) do set /a cnt+=1
set /A cnt=cnt-1
echo Dateien im Verzeichnis = %cnt%
PAUSE
exit /b
by Matt Williamson
19 May 2016 13:51
Forum: DOS Batch Forum
Topic: Disconnect Mapped drive
Replies: 4
Views: 2446

Re: Disconnect Mapped drive

I am enlightened. Thank you very much!
by Matt Williamson
19 May 2016 13:23
Forum: DOS Batch Forum
Topic: Disconnect Mapped drive
Replies: 4
Views: 2446

Re: Disconnect Mapped drive

Squashman wrote:I just use PUSHD and POPD.


I can't. Pushd balks in DEV environment and it doesn't take domain or password info that I'm aware of. That's why I have to use Net Use in DEV and put in PROD credentials.
by Matt Williamson
19 May 2016 11:14
Forum: DOS Batch Forum
Topic: Disconnect Mapped drive
Replies: 4
Views: 2446

Disconnect Mapped drive

I need some help with a script to map a drive do some things then unmap the drive. It also has to be able to work across 2 domains. It has to be a random drive because certain drive letters are being used on one domain and not the other and I never know which will be used at any given point to hard ...