December 27, 200817 yr Just to keep things as together as possible, here:http://www.boot-land.net/forums/index.php?showtopic=8219is a small batch to take advantage of the features of the dd --list mentioned before.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 Edited July 16, 200917 yr by jaclaz
December 28, 200817 yr 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.cmdThanks jaclaz for this batch program
December 28, 200817 yr new version ddlistw on the same link:http://www.boot-land.net/forums/index.php?showtopic=8219jaclaz Edited July 16, 200917 yr by jaclaz
December 29, 200817 yr Just for comparison with BootLand Forum http://www.boot-land.net/forums/index.php?...=6492&st=10Let's test the following CODE and CODEBOX for Copy and Paste in Notepadusing different Browsers:CODECopy 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 lineThe result using IE7 as browser is interesting and the same as for BootLand.On 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 BoxHow does this compare to Opera or FireFox as Browser ? Edited December 29, 200817 yr by wimb
December 29, 200817 yr Opera works correctly, 100% with CODEBOX, BUT with the CODE, TABs are converted in multiple (4) spaces. This latter behaviour is a known thing, and it is always a good idea when using TABs, to specify where they are.I haven't a Firefox installed now, so I cannot say. jaclaz
January 5, 200917 yr And Here are the results for Firefox:Firefox Copy CODE to Notepad:TAB is replaced by 4 SPACES, rest OK Firefox COPY CODEBOX to Notepad:TAB and multiple SPACE are replaced by single SPACE Rest (CR+LF and empty lines) displayed and Copy OK So Firefox is in this respect different as compared to IE7, but also NOT perfect BootLand Forum gives the same results for Firefox as compared to MSFN ForumCONCLUSION:The most safe way to get your prgram code is to use Copy from Post Reply Box and Paste in Notepad Edited January 5, 200917 yr by wimb
January 6, 200917 yr CONCLUSION:The most safe way to get your prgram code is to use Copy from Post Reply Box and Paste in Notepad MY CONCLUSION:The most safe way, not only to get a program in CODEBOX, is to use a GOOD browser (read OPERA).jaclaz
November 6, 201015 yr Hi,I just read this interesting topic, i would like to know if it's possible to remove space from %%A variable ?I try to execute the following code :for /F "tokens=1 delims=:\" %%A IN ('MOUNTVOL^|FINDSTR [A-Z]:\\') do net share %%A=%%A: /GRANT:"Tout le monde",FULLResult is that the space in %%A will block the NET SHARE command.c:\net share ........ E= .......... E: /GRANT:"Tout le monde",FULL....... = spaceI need to obtain the drive letter from MountVol without space behind.Many Thks for your help.Regards. Edited November 6, 201015 yr by ElrickLandon
November 6, 201015 yr I need to obtain the drive letter from MountVol without space behind.Go by steps. Open a command prompt.Run in it MOUNTVOL [ENTER]How does the output look?Now run MOUNTVOL | FIND ":\" [ENTER]How does the output look?Now run FOR /F "tokens=1 delims=:" %A in ('MOUNTVOL ^| FIND ":\"') DO ECHO x%Ax [ENTER]How does the output look?Now run FOR /F "tokens=1 delims=: " %A in ('MOUNTVOL ^| FIND ":\"') DO ECHO x%Ax [ENTER]please note how the above has a [sPACE] between "tokens=1 delims=:and the closing double quote:"How does the output look? jaclaz
November 7, 201015 yr Hi,I just read this interesting topic, i would like to know if it's possible to remove space from %%A variable ?I try to execute the following code :for /F "tokens=1 delims=:\" %%A IN ('MOUNTVOL^|FINDSTR [A-Z]:\\') do net share %%A=%%A: /GRANT:"Tout le monde",FULLResult is that the space in %%A will block the NET SHARE command.c:\net share ........ E= .......... E: /GRANT:"Tout le monde",FULL....... = spaceI need to obtain the drive letter from MountVol without space behind.Many Thks for your help.Regards.Try using a few more lines! (attempting to compact everything on one line will not make your batch file run any faster)@ECHO OFFFOR /F "DELIMS=:\" %%A IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO CALL :SUB %%AGOTO :EOF:SUBNET SHARE %1=%1: /GRANT:"Tout le monde",FULLNote I've changed the possible drive letters output to exclude A: and B: drives.
November 11, 201015 yr Thanks to all for your answer, if i use this code is it more correct ?setlocal enabledelayedexpansionfor /F "tokens=1 delims=:\" %%A IN ('MOUNTVOL^|FINDSTR [A-Z]:\\') do (set var=%%Aset var=!var: =!net share !var!=!var!: /GRANT:"Tout le monde",FULL >NULendlocal
Create an account or sign in to comment