DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: How to create a folder automatically on my PC using a weblink on the browser  (Read 4,714 times)

netra0

  • Participant
  • Joined in 2016
  • *
  • Posts: 1
Hello,
I have a url link on the browser page that is clickable (For example.,  Folder 2345 ). When I click this link, it should create a folder automatically on my computer, and should not prompt me with a file dialog box.
Does anybody know how to best achieve this?

Regards

Netra

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • Coding Snacks
You could try an AutoHotkey script.

In this example you would select the folder name in the browser, then hit the hotkey (control shift d) to copy it to clipboard and then make a folder with the name.  If there is no drive part in the folder name (does not contain ":") then it will be appended to C:\.

To test it uncomment the MsgBox line and comment out the FileCreateDir line

Clipboard text, if any, that was in the clipboard when the hotkey was pressed, is preserved.

Code: (autohotkey)
#SingleInstance ignore
SendMode Input
ClipSave := ""
Root := "C:\"
return

^+d::
	ClipSave := Clipboard
	Clipboard := ""
	Send ^c
	ClipWait 2
	FName=%Clipboard%
	If FName  not contains  :
		FName := Root FName
	Clipboard := ClipSave
	;MsgBox %FName%
	 FileCreateDir, %FName%
return

Original address: https://www.donationcoder.com/forum/index.php?topic=42610.0