Search found 20 matches

by DigitalSnow
26 Aug 2013 08:11
Forum: DOS Batch Forum
Topic: Color function v20 patched
Replies: 14
Views: 27094

Re: Color function v20

The change fixed the issue for me too. I used defined instead.

Code: Select all

Set "Text=%~2"
If Not Defined Text (Set Text=^")


Code: Select all

##################
"Final Version 20"
##################
by DigitalSnow
23 Aug 2013 16:17
Forum: DOS Batch Forum
Topic: Color function v20 patched
Replies: 14
Views: 27094

Re: Color function v20

Thanks for the fun script, but version 20 is not working as well as 19. I have not looked into why yet, but version 20 does not work correctly for me. This is how it outputs. Windows 7 Enterprise x64 http://i.imgur.com/TDQ28Vh.png Also Note that neither version 19 or 20 work when cmd is in unicode /...
by DigitalSnow
02 Mar 2013 21:25
Forum: DOS Batch Forum
Topic: IF THEN syntactic sugar
Replies: 4
Views: 9611

Re: IF THEN syntactic sugar

Fascinating post! Thanks for sharing the explanation and implementation. The call errorlevel trick is definitely something I will remember. and I can see the %&&% being handy.
by DigitalSnow
31 Jan 2013 18:59
Forum: DOS Batch Forum
Topic: Batch quine
Replies: 2
Views: 3563

Re: Batch quine

Of course Wikipedia has a good outline of a quine. m) See the following quote: However quines cannot receive any form of input, including reading a file. Which means the following shell script is not a quine. So unfortunately, according to the general rules, your script is not a quine because it tak...
by DigitalSnow
28 Jan 2013 20:00
Forum: DOS Batch Forum
Topic: IF curioisity: Delayed expansion of undefined variable = 0
Replies: 14
Views: 12880

Re: IF curioisity: Delayed expansion of undefined variable =

I think fairly self evident, especially since EQU is itself a command extension. Well I try not, to take any of the readers' knowledge for granted. Since there are many people who seem to read these forums, but who may not know all the intricacies of CMD BATCH. My statement was trying to make sure ...
by DigitalSnow
28 Jan 2013 17:53
Forum: DOS Batch Forum
Topic: IF curioisity: Delayed expansion of undefined variable = 0
Replies: 14
Views: 12880

Re: IF curioisity: Delayed expansion of undefined variable =

This behavior seems more like an error prevention mechanism of Extensions ' if command that is only visible with variable expansion on command execution. Here is my reasoning. Variable behavioral refresher... Variable expansion using percent signs %var% happens when the entire command line is read. ...
by DigitalSnow
24 Jan 2013 09:02
Forum: DOS Batch Forum
Topic: assing an ico file to a shortcut
Replies: 4
Views: 4838

Re: assing an ico file to a shortcut

You might want to use the %UserProfile% environment variable for simplicity. Also, I do not know of any way to set shortcut icons using just batch. Here is a script of mine that I use to create Shortcuts using batch and WScript. It could probably use some updates, but it works well enough for me :::...
by DigitalSnow
21 Jan 2013 20:47
Forum: DOS Batch Forum
Topic: Command Choice In a IF
Replies: 10
Views: 7495

Re: Command Choice In a IF

If I understand what you are wanting to do correctly. This should work. 1. Loop through each command line parameter. 2. If it exists in the folder, prompt the user for a choice 3. Else move the file to the folder. @echo off set corbeille=c:\corbeille cd %corbeille% || del %corbeille% >nul REM YOU CA...
by DigitalSnow
15 Jan 2013 20:35
Forum: DOS Batch Forum
Topic: Output text without linefeed, even with leading space or =
Replies: 18
Views: 35425

Re: Output text without linefeed, even with trailing space o

This will be a very useful technique. Thank you jeb. Im gonna keep this in my notes. :D
by DigitalSnow
15 Jan 2013 07:49
Forum: DOS Batch Forum
Topic: SET /P prompt mechanics - New behavior: = makes syntax error
Replies: 13
Views: 22473

Re: SET /P prompt mechanics - New behavior: = makes syntax e

Oh, and the reason the equals sign does not work at the beginning, is due to this limitation which is listed in the set /? help documentation. SET command will not allow an equal sign to be part of the name of a variable. When the first character is set as an equals sign it thinks that we are tryin...
by DigitalSnow
14 Jan 2013 10:57
Forum: DOS Batch Forum
Topic: SET /P prompt mechanics - New behavior: = makes syntax error
Replies: 13
Views: 22473

Re: SET /P prompt mechanics - New behavior: = makes syntax e

Oh, and the reason the equals sign does not work at the beginning, is due to this limitation which is listed in the set /? help documentation. SET command will not allow an equal sign to be part of the name of a variable. When the first character is set as an equals sign it thinks that we are tryin...
by DigitalSnow
14 Jan 2013 10:44
Forum: DOS Batch Forum
Topic: SET /P prompt mechanics - New behavior: = makes syntax error
Replies: 13
Views: 22473

Re: SET /P prompt mechanics - New behavior: = makes syntax e

I have found a solution for the = equals and space trimming issue. However it requires placing a non-display character into the batch script. I do not know if it works on any version of Windows. Only tested on Windows 7. <nul set /p =".[0x08]%Var%" Place any non-space non-issue character f...
by DigitalSnow
03 Jan 2013 14:35
Forum: DOS Batch Forum
Topic: Batch file to extract user profile from OU
Replies: 27
Views: 18287

Re: Batch file to extract user profile from OU

Glad that you got ldifde to work. :)

No need to use 3rd party tools when there are native solutions. That is my focus when using batch anyway.
by DigitalSnow
31 Dec 2012 13:53
Forum: DOS Batch Forum
Topic: Help w/ understanding %var:~x,y%
Replies: 5
Views: 4668

Re: Help w/ understanding %var:~x,y%

DosTips has a very helpful page in reference to String Manipulation here: http://www.dostips.com/DtTipsStringManipulation.php
by DigitalSnow
27 Dec 2012 18:23
Forum: DOS Batch Forum
Topic: Batch file to extract user profile from OU
Replies: 27
Views: 18287

Re: Batch file to extract user profile from OU

billrich wrote:What is OU?


See the bottom of my post above. They are Organizational Units for Active Directory in Windows Server.