Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'ExpWndPaths v1.0.1, January 2023.
- '
- 'https://www.reddit.com/user/jcunews1
- 'https://pastebin.com/u/jcunews
- 'https://greasyfork.org/en/users/85671-jcunews
- '
- 'Script to retrieve folder paths used by Explorer windows and
- 'saves them into the clipboard, then display them in Notepad.
- tt = "Explorer Window Folder Paths"
- s = ""
- for each sf in createobject("shell.application").windows
- if left(typename(sf.document), 16) = "IShellFolderView" then
- set fd = sf.document.folder
- if s <> "" then s = s & vbcrlf
- s = s & fd & ":" & vbcrlf & fd.self.path & vbcrlf
- end if
- next
- if s = "" then
- msgbox "No Explorer window is found.", 16, tt
- wscript.quit
- end if
- set fs = createobject("scripting.filesystemobject")
- n = fs.getspecialfolder(2) & "\" & (timer * 100) & ".tmp"
- set f = fs.createtextfile(n, true)
- f.write tt & vbcrlf & vbcrlf & s
- f.close
- set ws = createobject("wscript.shell")
- ws.run "cmd.exe /c type """ & n & """|clip", 0, true
- fs.deletefile n
- if ws.run("cmd.exe /c start notepad.exe", 0, true) <> 0 then wscript.quit
- do while not ws.appactivate("Untitled - Notepad")
- wscript.sleep 100
- loop
- ws.sendkeys "^v"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement