Guest User

Untitled

a guest
Jul 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. :: Q:Test2018720SU_1341778.cmd
  2. :: DirKind.cmd music x:pathfolder
  3. @Echo off
  4.  
  5. :: Possible Kind_ type strings
  6. Set "Kinds=calendar communication contact document email link music picture"
  7. Set "Kinds=%Kinds% playlist program recordedtv searchfolder video"
  8.  
  9. Echo=%Kinds%|Findstr /i "%~1" 2>&1>Nul ||(Echo invalid Kind:%1 &TimeOut 5&Exit /B 1)
  10.  
  11. Set "TempFile=%temp%Kind_%~1.ext"
  12. :: Build Kind_ string enumerating extensions
  13. Set "Key=HKLMSOFTWAREMicrosoftWindowsCurrentVersionExplorerKindMap"
  14. ( For /f "tokens=1,3" %%A in (
  15. 'reg query "%Key%"^|find "%~1"'
  16. ) do For %%C in (%%B) Do Echo=%%A
  17. ) > "%TempFile%"
  18.  
  19. Echo Dir all files of Kind %1 in folder "%~2"
  20. Call Set "Kind=%%Kind_%1%%"
  21. For /f "delims=" %%A in (
  22. 'Dir /B /A-d "%~2*" ^| Findstr /i /E /G:"%TempFile%" '
  23. ) Do Echo %%A
  24.  
  25. > Q:Test2018720SU_1341778.cmd link "%USERPROFILE%Desktop"
  26. Dir all files of Kind link in folder "C:UsersLotPingsDesktop"
  27. Access 2016.lnk
  28. ClassicStartMenu.exe - Verknüpfung.lnk
  29. Excel 2016.lnk
  30. FreeCommander XE.lnk
  31. Microsoft Edge.lnk
  32. OneNote 2016.lnk
  33. Outlook 2016.lnk
  34. PowerPoint 2016.lnk
  35. Publisher 2016.lnk
  36. shutdown.exe.lnk
  37. UltraVNC Server.lnk
  38. UltraVNC Settings.lnk
  39. UltraVNC Viewer.lnk
  40. WinDirStat.lnk
  41. Windows 10-Update-Assistent.lnk
  42. Word 2016.lnk
Add Comment
Please, Sign In to add comment