Jump to content











Photo
- - - - -

ddlist and ddlistW


  • Please log in to reply
13 replies to this topic

#1 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 26 December 2008 - 07:57 PM

TOPIC splitted from here:
http://www.boot-land...?showtopic=6492

I will check and attach latest versions of both ddlist and ddlistW to this post.

@bilou_gateux

It seems like VERY nice :cheers:, though I still have to test/understand - even minimally - how it works and which differences/advantages there are with other drivers.

about the dosdev, you might be interested in a couple of things here:
http://www.msfn.org/...opic=125992&hl=
http://www.msfn.org/...opic=126069&hl=
http://www.msfn.org/...opic=124539&hl=
particularly these:
http://www.msfn.org/...o...24539&st=22
http://www.msfn.org/...o...24539&st=24

And this newish batch ddlist.cmd:
@ECHO OFF:: ddlist.cmd - small batch by jaclaz - Release 0.1 ALPHA:: 26th December 2008:: using the features of John Newbigin's dd for windows:: [url="http://www.chrysocome.net/dd"]http://www.chrysocome.net/dd[/url]:: tested version 0.5::: [url="http://www.chrysocome.net/downloads/dd-0.5.zip"]http://www.chrysocome.net/downloads/dd-0.5.zip[/url]::  SETLOCAL ENABLEEXTENSIONSSETLOCAL ENABLEDELAYEDEXPANSIONSET FLAG=0Set /A Counter=10For /F  "skip=4 tokens=*" %%A IN ('dd --list 2^>^&1') DO (SET Thisline=%%ASET Partline=!Thisline:~0,7!IF "!Partline!"=="\\.\Vol" (SET /A COunter+=1SET Volume!Counter!=!Thisline:~10,38!)IF "!Partline!"=="NT Bloc" SET FLAG=1IF !FLAG!==0 (IF "!Partline!"=="link to" SET link!Counter!=!Thisline:~19,40!IF NOT "!Partline!"=="Mounted" SET media!Counter!=!Thisline!) ELSE (IF "!Partline!"=="link to" SET tolink!Counter!=!Thisline:~19,40!)IF "!Partline!"=="Mounted" SET Letter!Counter!=!Thisline:~15,2!IF "media!Counter!"=="CD-ROM" CALL :isCDROM !Counter!IF "!Partline!"=="\\?\Dev" (SET /A Counter+=1SET drive!Counter!=!Thisline:~11,40!Set isCD=!Thisline:~11,5!IF "!isCD!"=="CdRom" CALL :isCDROM !Counter!))SET /A MaxCounter=%Counter%-1FOR /F "tokens=1,2 delims==. " %%A IN ('SET media') DO (SET %%A=%%BIf "!%%A!"=="fixed" SET %%A=Fixed    If "!%%A!"=="removeable" SET %%A=RemovableIf "!%%A!"=="CD-ROM" SET %%A=CD-ROM   )FOR /F  "tokens=1,2,3,4,6 delims=e=k\n" %%A IN ('set drive') DO (SET Thisline=%%CSET Partline=!Thisline:~0,5!SET g%%Ae%%B=%%D,%%EIF "!Partline!"=="CdRom" SET gdrive%%B=x,xFOR /L %%F IN (10,1,%MaXcounter%) DO (IF "!tolink%%B!"=="!link%%F!" SET Line%%B=!letter%%F! !gdrive%%B! !media%%F! !tolink%%B!!TAB%%B!	!volume%%F! ))ECHO Drives by drive letter:FOR /F "tokens=2 delims==" %%A IN (' SET Line  ^| SORT /+8') DO ECHO %%APAUSEECHO.ECHO Drives by connection:FOR /F "tokens=2 delims==" %%A IN (' SET Line  ^| SORT /+11') DO ECHO %%APAUSEGOTO :EOF:isCDROMSET tolink%1=!drive%1!SET TAB%1=		GOTO :EOF
Example output:
C:\VSS>ddlistDrives by drive letter:c: 0,1 Fixed     HarddiskVolume1        {b0b284c3-8a33-11dd-8781-806d6172696f}d: 1,1 Fixed     HarddiskVolume2        {b0b284c4-8a33-11dd-8781-806d6172696f}e: 3,1 Fixed     HarddiskVolume3        {98f06d4c-9506-11dd-8147-001fc6bb76ce}f: 8,1 Fixed     HarddiskVolume11       {0cb309be-d343-11dd-ab05-001fc6bb76ce}g: 3,2 Fixed     HarddiskVolume4        {98f06d4d-9506-11dd-8147-001fc6bb76ce}h: 3,3 Fixed     HarddiskVolume5        {98f06d4e-9506-11dd-8147-001fc6bb76ce}i: x,x CD-ROM    CdRom0                 {80cf88c2-8a34-11dd-813c-806d6172696f}j: 2,1 Removable Harddisk2\DP(1)0-0+5   {5d3e8800-9c1f-11dd-8148-001fc6bb76ce}k: 4,1 Removable Harddisk4\DP(1)0-0+f   {80cf88c3-8a34-11dd-813c-806d6172696f}l: 5,1 Removable Harddisk5\DP(1)0-0+10  {80cf88c4-8a34-11dd-813c-806d6172696f}m: 6,1 Removable Harddisk6\DP(1)0-0+11  {80cf88c5-8a34-11dd-813c-806d6172696f}n: 7,1 Removable Harddisk7\DP(1)0-0+12  {80cf88c6-8a34-11dd-813c-806d6172696f}o: 3,4 Fixed     HarddiskVolume6        {98f06d4f-9506-11dd-8147-001fc6bb76ce}Premere un tasto per continuare . . .Drives by connection:c: 0,1 Fixed     HarddiskVolume1        {b0b284c3-8a33-11dd-8781-806d6172696f}d: 1,1 Fixed     HarddiskVolume2        {b0b284c4-8a33-11dd-8781-806d6172696f}j: 2,1 Removable Harddisk2\DP(1)0-0+5   {5d3e8800-9c1f-11dd-8148-001fc6bb76ce}e: 3,1 Fixed     HarddiskVolume3        {98f06d4c-9506-11dd-8147-001fc6bb76ce}g: 3,2 Fixed     HarddiskVolume4        {98f06d4d-9506-11dd-8147-001fc6bb76ce}h: 3,3 Fixed     HarddiskVolume5        {98f06d4e-9506-11dd-8147-001fc6bb76ce}o: 3,4 Fixed     HarddiskVolume6        {98f06d4f-9506-11dd-8147-001fc6bb76ce}k: 4,1 Removable Harddisk4\DP(1)0-0+f   {80cf88c3-8a34-11dd-813c-806d6172696f}l: 5,1 Removable Harddisk5\DP(1)0-0+10  {80cf88c4-8a34-11dd-813c-806d6172696f}m: 6,1 Removable Harddisk6\DP(1)0-0+11  {80cf88c5-8a34-11dd-813c-806d6172696f}n: 7,1 Removable Harddisk7\DP(1)0-0+12  {80cf88c6-8a34-11dd-813c-806d6172696f}f: 8,1 Fixed     HarddiskVolume11       {0cb309be-d343-11dd-ab05-001fc6bb76ce}i: x,x CD-ROM    CdRom0                 {80cf88c2-8a34-11dd-813c-806d6172696f}Premere un tasto per continuare . . .

;)

jaclaz

#2 wimb

wimb

    Gold Member

  • Developer
  • 2,180 posts
  •  
    Netherlands

Posted 28 December 2008 - 08:02 AM

ddlist.cmd is very handy and is giving for each drive all important identification parameters in one line.

Now it is easy to relate drive letter to harddisk and partition number.

For the layout it might be preferable to use no TAB and to make it similar to symbol2mvol.cmd

Thanks jaclaz for this batch program :cheers:

#3 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 28 December 2008 - 10:29 AM

For the layout it might be preferable to use no TAB and to make it similar to symbol2mvol.cmd


No prob, but I need to remove anyway the "\\." part as otherwise I simply have not enough space for the "x,x" Physicaldrivenumber/Partition.

BTW, re-running symbol2mvol.cmd, it goes "beserk" with a VSS drive enabled, giving two Volumes for same drive, I will look into it. :cheers:
But this ddlistw should be better. ;)

@ECHO OFF:: ddlistW.cmd - small batch by jaclaz - Release 0.1 ALPHA:: 28th December 2008 - Version changed according to wimb suggestion:: using the features of John Newbigin's dd for windows:: [url="http://www.chrysocome.net/dd"]http://www.chrysocome.net/dd[/url]:: tested version 0.5::: [url="http://www.chrysocome.net/downloads/dd-0.5.zip"]http://www.chrysocome.net/downloads/dd-0.5.zip[/url]::  SETLOCAL ENABLEEXTENSIONSSETLOCAL ENABLEDELAYEDEXPANSIONSET FLAG=0Set /A Counter=10For /F  "skip=4 tokens=*" %%A IN ('dd --list 2^>^&1') DO (SET Thisline=%%ASET Partline=!Thisline:~0,7!IF "!Partline!"=="\\.\Vol" (SET /A COunter+=1SET Volume!Counter!=!Thisline:~10,38!)IF "!Partline!"=="NT Bloc" SET FLAG=1IF !FLAG!==0 (IF "!Partline!"=="link to" SET link!Counter!=!Thisline:~19,40!IF NOT "!Partline!"=="Mounted" SET media!Counter!=!Thisline!) ELSE (IF "!Partline!"=="link to" SET tolink!Counter!=!Thisline:~19,40!)IF "!Partline!"=="Mounted" SET Letter!Counter!=!Thisline:~15,2!IF "media!Counter!"=="CD-ROM" CALL :isCDROM !Counter!IF "!Partline!"=="\\?\Dev" (SET /A Counter+=1SET drive!Counter!=!Thisline:~11,40!Set isCD=!Thisline:~11,5!IF "!isCD!"=="CdRom" CALL :isCDROM !Counter!))SET /A MaxCounter=%Counter%-1FOR /F "tokens=1,2 delims==. " %%A IN ('SET media') DO (SET %%A=%%BIf "!%%A!"=="fixed" SET %%A=FIXIf "!%%A!"=="removeable" SET %%A=REMIf "!%%A!"=="CD-ROM" SET %%A=CDR)FOR /F  "tokens=1,2,3,4,6 delims=e=k\n" %%A IN ('set drive') DO (SET Thisline=%%CSET Partline=!Thisline:~0,5!SET g%%Ae%%B=%%D,%%EIF "!Partline!"=="CdRom" SET gdrive%%B=x,xFOR /L %%F IN (10,1,%MaXcounter%) DO (IF "!tolink%%B!"=="!link%%F!" SET Line%%B=!letter%%F! !gdrive%%B! !media%%F! \Volume!volume%%F! \!tolink%%B!))ECHO Drives by drive letter:FOR /F "tokens=2 delims==" %%A IN (' SET Line  ^| SORT /+8') DO ECHO %%APAUSEECHO.ECHO Drives by connection:FOR /F "tokens=2 delims==" %%A IN (' SET Line  ^| SORT /+11') DO ECHO %%APAUSEGOTO :EOF:isCDROMSET tolink%1=!drive%1!GOTO :EOF
Sample output:
C:\VSS>ddlistwDrives by drive letter:c: 0,1 FIX \Volume{b0b284c3-8a33-11dd-8781-806d6172696f} \HarddiskVolume1d: 1,1 FIX \Volume{b0b284c4-8a33-11dd-8781-806d6172696f} \HarddiskVolume2e: 3,1 FIX \Volume{98f06d4c-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume3f: 8,1 FIX \Volume{0cb309be-d343-11dd-ab05-001fc6bb76ce} \HarddiskVolume11g: 3,2 FIX \Volume{98f06d4d-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume4h: 3,3 FIX \Volume{98f06d4e-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume5i: x,x CDR \Volume{80cf88c2-8a34-11dd-813c-806d6172696f} \CdRom0j: 2,1 REM \Volume{5d3e8800-9c1f-11dd-8148-001fc6bb76ce} \Harddisk2\DP(1)0-0+5k: 4,1 REM \Volume{80cf88c3-8a34-11dd-813c-806d6172696f} \Harddisk4\DP(1)0-0+fl: 5,1 REM \Volume{80cf88c4-8a34-11dd-813c-806d6172696f} \Harddisk5\DP(1)0-0+10m: 6,1 REM \Volume{80cf88c5-8a34-11dd-813c-806d6172696f} \Harddisk6\DP(1)0-0+11n: 7,1 REM \Volume{80cf88c6-8a34-11dd-813c-806d6172696f} \Harddisk7\DP(1)0-0+12o: 3,4 FIX \Volume{98f06d4f-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume6Premere un tasto per continuare . . .Drives by connection:c: 0,1 FIX \Volume{b0b284c3-8a33-11dd-8781-806d6172696f} \HarddiskVolume1d: 1,1 FIX \Volume{b0b284c4-8a33-11dd-8781-806d6172696f} \HarddiskVolume2j: 2,1 REM \Volume{5d3e8800-9c1f-11dd-8148-001fc6bb76ce} \Harddisk2\DP(1)0-0+5e: 3,1 FIX \Volume{98f06d4c-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume3g: 3,2 FIX \Volume{98f06d4d-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume4h: 3,3 FIX \Volume{98f06d4e-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume5o: 3,4 FIX \Volume{98f06d4f-9506-11dd-8147-001fc6bb76ce} \HarddiskVolume6k: 4,1 REM \Volume{80cf88c3-8a34-11dd-813c-806d6172696f} \Harddisk4\DP(1)0-0+fl: 5,1 REM \Volume{80cf88c4-8a34-11dd-813c-806d6172696f} \Harddisk5\DP(1)0-0+10m: 6,1 REM \Volume{80cf88c5-8a34-11dd-813c-806d6172696f} \Harddisk6\DP(1)0-0+11n: 7,1 REM \Volume{80cf88c6-8a34-11dd-813c-806d6172696f} \Harddisk7\DP(1)0-0+12f: 8,1 FIX \Volume{0cb309be-d343-11dd-ab05-001fc6bb76ce} \HarddiskVolume11i: x,x CDR \Volume{80cf88c2-8a34-11dd-813c-806d6172696f} \CdRom0Premere un tasto per continuare . . .

jaclaz

#4 wimb

wimb

    Gold Member

  • Developer
  • 2,180 posts
  •  
    Netherlands

Posted 28 December 2008 - 11:04 AM

No prob, but I need to remove anyway the "\\." part as otherwise I simply have not enough space for the "x,x" Physicaldrivenumber/Partition.

Yes, I like this layout of the output :cheers:
In this way you can use the output also more easily with other programs.

And I won't forget that the "\\." part was removed on purpose, to get a proper layout.

The program code is most easily obtained by copy from a post reply window,
since copying the posted "code" needs some manipulation to make ddlistW.cmd Program.

Thanks jaclaz ;)

#5 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 28 December 2008 - 01:04 PM

The program code is most easily obtained by copy from a post reply window,
since copying the posted "code" needs some manipulation to make ddlistW.cmd Program.


That's the strange part. :cheers:

What browser are you using?

With Opera you select the text inside the CODEBOX, paste it in a new NOTEPAD document, save it to ddlistW.cmd and it works.

Just for the sake of experiment I tried doing the above saving it as ddlistw2.cmd and then:
C:\VSS>fc ddlistw.cmd ddlistw2.cmd

Confronto in corso dei file ddlistw.cmd e DDLISTW2.CMD

FC: nessuna differenza riscontrata
(NO difference in FC)

jaclaz

#6 wimb

wimb

    Gold Member

  • Developer
  • 2,180 posts
  •  
    Netherlands

Posted 28 December 2008 - 01:13 PM

That's the strange part. :cheers:

What browser are you using?

With Opera you select the text inside the CODEBOX, paste it in a new NOTEPAD document, save it to ddlistW.cmd and it works.

Yes, it is strange indeed !

I am using XP with Internet Explorer 7
When I select the text inside the CODEBOX, copy and paste it in a new NOTEPAD,
then I get all code in 1 rule, that means all CR + LF (and any TABS as well) are gone !

Paste in WordPad or Word preserves the CR+LF
But I found it easier to copy the code from the Post Reply window ;)


Strange difference with Opera !

#7 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 28 December 2008 - 01:37 PM

Strange difference with Opera !


Well, NO, Opera works as it should :cheers: , I would define it as a "normal" ;) difference in IE7, given that the MS guys programmed it, most probably it is a "by design" feature:
http://www.boot-land...?showtopic=3541

:cheers:

jaclaz

#8 wimb

wimb

    Gold Member

  • Developer
  • 2,180 posts
  •  
    Netherlands

Posted 28 December 2008 - 01:49 PM

For comparison, this is the Code of ddlistW.cmd as copied by me
from the Reply Post window, and then pasted in Notepad and Saved as ddlistw.cmd

It is the CODEBOX feature which is causing the problem,
for Copy from IE7 to Notepad :cheers: as illustrated below.

CODE OK for copy and paste from IE7 to Notepad
@ECHO OFF:: ddlistW.cmd - small batch by jaclaz - Release 0.1 ALPHA:: 28th December 2008 - Version changed according to wimb suggestion:: using the features of John Newbigin's dd for windows:: [url="http://www.chrysocome.net/dd"]http://www.chrysocome.net/dd[/url]:: tested version 0.5::: [url="http://www.chrysocome.net/downloads/dd-0.5.zip"]http://www.chrysocome.net/downloads/dd-0.5.zip[/url]::  SETLOCAL ENABLEEXTENSIONSSETLOCAL ENABLEDELAYEDEXPANSIONSET FLAG=0Set /A Counter=10For /F  "skip=4 tokens=*" %%A IN ('dd --list 2^>^&1') DO (SET Thisline=%%ASET Partline=!Thisline:~0,7!IF "!Partline!"=="\\.\Vol" (SET /A COunter+=1SET Volume!Counter!=!Thisline:~10,38!)IF "!Partline!"=="NT Bloc" SET FLAG=1IF !FLAG!==0 (IF "!Partline!"=="link to" SET link!Counter!=!Thisline:~19,40!IF NOT "!Partline!"=="Mounted" SET media!Counter!=!Thisline!) ELSE (IF "!Partline!"=="link to" SET tolink!Counter!=!Thisline:~19,40!)IF "!Partline!"=="Mounted" SET Letter!Counter!=!Thisline:~15,2!IF "media!Counter!"=="CD-ROM" CALL :isCDROM !Counter!IF "!Partline!"=="\\?\Dev" (SET /A Counter+=1SET drive!Counter!=!Thisline:~11,40!Set isCD=!Thisline:~11,5!IF "!isCD!"=="CdRom" CALL :isCDROM !Counter!))SET /A MaxCounter=%Counter%-1FOR /F "tokens=1,2 delims==. " %%A IN ('SET media') DO (SET %%A=%%BIf "!%%A!"=="fixed" SET %%A=FIXIf "!%%A!"=="removeable" SET %%A=REMIf "!%%A!"=="CD-ROM" SET %%A=CDR)FOR /F  "tokens=1,2,3,4,6 delims=e=k\n" %%A IN ('set drive') DO (SET Thisline=%%CSET Partline=!Thisline:~0,5!SET g%%Ae%%B=%%D,%%EIF "!Partline!"=="CdRom" SET gdrive%%B=x,xFOR /L %%F IN (10,1,%MaXcounter%) DO (IF "!tolink%%B!"=="!link%%F!" SET Line%%B=!letter%%F! !gdrive%%B! !media%%F! \Volume!volume%%F! \!tolink%%B!))ECHO Drives by drive letter:FOR /F "tokens=2 delims==" %%A IN (' SET Line  ^| SORT /+8') DO ECHO %%APAUSEECHO.ECHO Drives by connection:FOR /F "tokens=2 delims==" %%A IN (' SET Line  ^| SORT /+11') DO ECHO %%APAUSEGOTO :EOF:isCDROMSET tolink%1=!drive%1!GOTO :EOF

wimb

#9 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 28 December 2008 - 02:12 PM

And again, the problem is with IE.
Or probably with something OLE related. :cheers:

It would be interesting to experiment with some Notepad replacement, if Wordpad works it could be a Notepad specific problem. ;)

Best Notepad replacement (IMHO) - good things come in small packages:
http://www.movsd.com/thegun.htm
http://www.movsd.com/topgun.htm

jaclaz

#10 wimb

wimb

    Gold Member

  • Developer
  • 2,180 posts
  •  
    Netherlands

Posted 28 December 2008 - 02:27 PM

I tried thegun and topgun and TED Notepad:
all give the same result:
Copy from IE7 CodeBox to Notepad results in 1 line e.g. loosing all CR+LF

Pasting the text in TinyHexer as Text reveals that indeed 0D0A are missing
on Copy from IE7 CodeBox

#11 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7,100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 28 December 2008 - 03:05 PM

Just tried with IE 6, and the WRONG behaviour is the same.

Try using "Paste Special" with Word and experiment the various options.

If you select "not formatted text" the behaviour is the same as Notepad.

If you select either RTF or HTML (which is the default) it SEEMS like right (but it is not).

Press the button (to show in Word "hidden" characters).

You will see how all the CR+LF (that would normally show as "¶" ) have been substituted by a "down and left arrow" character, which is the same a "new line within same paragraph" (SHIFT+Enter in Word - ALT+Enter in Excel - CTRL+Enter in Openoffice.org :cheers:)

As soon as you try to save the file in .txt format, you are prompted on how to manage CR+LF.....and once saved in .txt everything is "right"

The problem is definitely IE that stores the copied text in the clipboard in a phantomatic "HTML" format.

Just run clibrd.exe and try using the copy from Opera or from IE.....;)

Moral of the story, there are good browsers and bad browsers.....

....anyone is game to test firefox? :cheers:

jaclaz

#12 wimb

wimb

    Gold Member

  • Developer
  • 2,180 posts
  •  
    Netherlands

Posted 29 December 2008 - 08:02 AM

Let's test the following CODE and CODEBOX for Copy and Paste in Notepad
using different Browsers:

CODE
Copy this text from CODE or CODEBOX in your browser display and Paste in NotepadThe second line has SPACE separated WordsThe   third   line   has   multiple   SPACE   separated   WordsThe	fourth	line	has	TAB	separated	WordsThe seventh line appears after empty fifth and sixth line
The result using IE7 as browser is interesting and the same as for MSFN Forum http://www.msfn.org/board/index.php?showto...24539&st=33On Copy in Notepad we see:For CODE the TAB character is replaced by 4 Spaces, rest is OKFor CODEBOX all CR+LF are gone (everything in 1 line), but multiple SPACE and TAB are preservedFor CODEBOX all empty lines are lost, but reappear in Post Edit or Post Reply Box

How does this compare to Opera or FireFox as Browser ?

#13 dog

dog

    Frequent Member

  • Expert
  • 233 posts

Posted 31 December 2008 - 09:37 AM

<bit off topic>
ff 3.01 (on BartPE) copying from "code" to notepad turns tabs into 4 spaces, codebox to notepad turns multi space or tab into single space. CRLF's are fine.
</bit off topic>

#14 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 10,991 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 04 June 2013 - 08:16 AM

Since the code was botched by one of the stupid board updates, I am attaching here a .zip.

 

:cheers:

Wonko

Attached Files


  • wimb likes this