Solved how to get a list of all desktop urls in windows10

August 2, 2020 at 15:21:21
Specs: Windows 10
Any easy way to get a list of all windows10 desktop urls without doing them one at a time?

I could put them one at a time in a list, but have over 200 icon urls.


See More: how to get a list of all desktop urls in windows10


✔ Best Answer
August 3, 2020 at 03:23:18
Did you mean that you want to extract the target of all files with this extension .url ? And all Links with extension .lnk ?

EDIT : 03/08/2020 @ 16:45

You can try with this batch file, just copy and paste this code below on your notepad or notepad++ and save it as Shortcut-Extarctor.bat

Shortcut-Extarctor.bat

@echo off
CHCP 65001>nul
Title Extracting target from shortcut (*.url) and (*.lnk) by Hackoo 2020
Mode con cols=62 lines=3 & color 9E
Set "Log=%~dp0TARGET_LINK_PATHS.txt"
If Exist "%Log%" Del "%Log%"
Set "TmpVbs=%Tmp%\%~n0.vbs"
::************************************************************************
(
	echo set Ws = CreateObject("WScript.Shell"^)
	echo set Lnk = Ws.Createshortcut(WScript.Arguments(0^)^)
	echo WScript.echo Chr(34^) ^& Lnk.TargetPath ^& Chr(34^)
)>"%Tmpvbs%"
::************************************************************************
Set "Links=url lnk"
Set "Folders=%UserProfile%\Desktop"
For %%i in (%Links%) Do (
	For %%F in (%Folders%) Do (
		Cls
		Echo(********************************************************************
		Echo "%%F" for "*.%%i" Links
		(echo. & echo     Scanning "%%F" for "*.%%i" Links ...)>CON
		Echo(********************************************************************
		Echo;
			For /f "delims=" %%L in ('Dir /b /s "%%F\*.%%i"') do (
	 			echo "%%L" & Call:ExtractTarget "%%L"
	 			echo  --------------------------------------------------------
			)
	)		
)>>"%Log%"
Start "" /MAX "%Log%"
If Exist "%Tmpvbs%" Del "%Tmpvbs%"
Exit
::-------------------------------------------------------------------------
:ExtractTarget <Link>
cscript //nologo "%Tmpvbs%" "%~1"
Exit /b
::-------------------------------------------------------------------------

message edited by Hackoo



#1
August 2, 2020 at 16:05:32
This is an URL, is that what you mean?
https://www.verisign.com/en_US/webs...

Reply ↓  Report •

#2
August 2, 2020 at 16:12:00
Why would you have 200 URLs on your desktop? Most people save them as Bookmarks or Favorites.

Reply ↓  Report •

#3
August 2, 2020 at 16:14:29
Put Desktop folder into this method.

List Directory Contents To A Printable and Readable Txt File [How-To]
http://www.groovypost.com/howto/mic...
http://www.online-tech-tips.com/com...


Reply ↓  Report •

Related Solutions

#4
August 3, 2020 at 03:23:18
✔ Best Answer
Did you mean that you want to extract the target of all files with this extension .url ? And all Links with extension .lnk ?

EDIT : 03/08/2020 @ 16:45

You can try with this batch file, just copy and paste this code below on your notepad or notepad++ and save it as Shortcut-Extarctor.bat

Shortcut-Extarctor.bat

@echo off
CHCP 65001>nul
Title Extracting target from shortcut (*.url) and (*.lnk) by Hackoo 2020
Mode con cols=62 lines=3 & color 9E
Set "Log=%~dp0TARGET_LINK_PATHS.txt"
If Exist "%Log%" Del "%Log%"
Set "TmpVbs=%Tmp%\%~n0.vbs"
::************************************************************************
(
	echo set Ws = CreateObject("WScript.Shell"^)
	echo set Lnk = Ws.Createshortcut(WScript.Arguments(0^)^)
	echo WScript.echo Chr(34^) ^& Lnk.TargetPath ^& Chr(34^)
)>"%Tmpvbs%"
::************************************************************************
Set "Links=url lnk"
Set "Folders=%UserProfile%\Desktop"
For %%i in (%Links%) Do (
	For %%F in (%Folders%) Do (
		Cls
		Echo(********************************************************************
		Echo "%%F" for "*.%%i" Links
		(echo. & echo     Scanning "%%F" for "*.%%i" Links ...)>CON
		Echo(********************************************************************
		Echo;
			For /f "delims=" %%L in ('Dir /b /s "%%F\*.%%i"') do (
	 			echo "%%L" & Call:ExtractTarget "%%L"
	 			echo  --------------------------------------------------------
			)
	)		
)>>"%Log%"
Start "" /MAX "%Log%"
If Exist "%Tmpvbs%" Del "%Tmpvbs%"
Exit
::-------------------------------------------------------------------------
:ExtractTarget <Link>
cscript //nologo "%Tmpvbs%" "%~1"
Exit /b
::-------------------------------------------------------------------------

message edited by Hackoo


Reply ↓  Report •

Ask Question