24

Anyone know of a way to simply paste a screenshot (taken with PrtScn or Alt+PrtScn) into a Windows Explorer folder and have it be saved as an image (possibly with a dialog asking about image size and format options)? That is, I might take a screenshot with print screen, open a folder and hit Ctrl+V, and a new jpg (or png, or whatever) would appear in that folder with the contents of my screenshot.

2
  • Directly paste a screenshot held in the clipboard into a Windows folder, no, this would require software of some sort, I have never seen this type of software, interesting idea though.
    – Moab
    Nov 19, 2010 at 16:16
  • 4
    it might help to know that on Windows 10 if you press the win + print screen keys, a file of the picture will be pasted it in C:\Users\xx\Pictures\Screenshots
    – JinSnow
    Jun 25, 2019 at 9:07

6 Answers 6

14

I just found https://github.com/EslaMx7/PasteIntoFiles This "PasteIntoFiles" freeware on GitHub adds a shortcut to the Windows Explorer context-menu that opens a tiny tool with the current folder pre-selected, and a "Save" button. It works with Windows 10.

1
  • 1
    Working perfectly! Even in Windows 11. Aug 12, 2021 at 13:17
9

After I posted this request to the DonationCoder netizens, the world was given a handy piece of software by c.gingerich that fits the bill nicely. (The project's page is also at http://paf.pen.io/, and now costs money, but there are old free versions about.)

This snapshot of the blog linked below links to this page, which in turn links to this EXE file hosted on archive.org.

Paste As File. Right click on the desktop or on the background of a Windows explorer window and select Past As File. You can then save the clipboard to a file based on the contents. Either a text file or an image in PNG or JPG format. You can download it from my website if you are interested. It's free.

context menu showing PasteAsFile

6
1

If you're running Windows Vista or Windows 7 I'd recommend using "Snipping Tool" which comes installed automatically.

It's a bit more versatile than the Prtscn command and it allows for direct saving, copying and pasting, etc.

As for the PrtScn command copying to Explorer automatically, I think that this isn't possible due to the format in which the command takes the screenshot.

3
  • 3
    I like snipping tool (and am running Win7), but I'd still love to have the functionality I describe in the question. Also, anything's possible if you have the time/money/determination - I could envision a service or taskbar application which monitors clipboard contents for the signature of an image and detects when Ctrl+V is pressed while the active window is an Explorer window. Then, all that's left to do is transform the clipboard contents to an image format and save to the folder in the active window. I bet AutoHotKey provides a method to do so. But I don't want to reinvent the wheel. :-)
    – Pat
    Nov 19, 2010 at 16:45
  • 3
    SnippingTool doesn't do this (i.e. pasting image on the clipboard to a folder without having to do multiple extra steps such as opening other applications, navigating to the folder, etc.). Also, for the "PrtScn command copying to Explorer automatically", it is possible; yes, the format is different, you just have to convert the format. Jul 29, 2013 at 22:29
  • Snipping Tool is very useful in its own right but nonetheless does not answer the question. Jan 17, 2020 at 13:52
1

Use autohotkey calling a powershell script.

Powershell:

Add-Type -AssemblyName System.Windows.Forms  ### not necessary in PowerShell_ISE
if ($([System.Windows.Forms.Clipboard]::ContainsImage())) {
    $image = [System.Windows.Forms.Clipboard]::GetImage()
    $filename='<yourdefault>.png'
    
    if ($args[0]) {
        $filename=$args[0]
    }
    
    [System.Drawing.Bitmap]$image.Save($filename,
                    [System.Drawing.Imaging.ImageFormat]::Png)

    Write-Output "clipboard content saved as $filename"

} else {
    Write-Output "clipboard does not contains image data"
}

... this can be called then from the autohotkey script below

autohotkey

; based on ActiveFolderPath() by Scoox https://autohotkey.com/board/topic/70960-detect-current-windows-explorer-location/
AFP(WinTitle="A")
{
    WinGetClass, Class, %WinTitle%
    If (Class ~= "Program|WorkerW") ;desktop
    {
        WinPath := A_Desktop
        valid:=1
    }
    Else ;all other windows
    {
        WinGetText, WinPath, A
        RegExMatch(WinPath, ".:\\.*", WinPath)
        for w in ComObjCreate("Shell.Application").Windows    ; grab the folder path
        {
            aac = % w.Document.Folder.Self.Path
            if (WinPath=aac) {
                valid:=1
                break
            }
        }   
    }
    if !valid {
        WinPath := A_Desktop ; Default to desktop
        ; return ; .. or Default to null
    }
    WinPath := RegExReplace(WinPath, "\\+$") 
    If WinPath 
        WinPath .= "\"
        
    Return WinPath
}
return

; Paste clipboard image to local file
^F15::
    filename:= AFP() . A_Year "_" A_MM "_" A_DD "_" A_Hour . A_Min . A_Sec . ".png"
    command:="<powershellscriptpath>.ps1 '" filename "'"

    RunWait, PowerShell.exe -ExecutionPolicy Bypass -Command %command%
    
    ;Show the file in an explorer window
    Run explorer /select`, %filename%

return
2
  • few parts tripped me up 1. To create a powershell script, create a file called name.ps1, paste the code in. 2. In the autohotkey script, the <powershellscriptpath> uses the path syntax C:\ 3. I forgot that the line of code in the autohotkey script that has: ^F15:: means ctrl+F15 is the key to press in order to...well ur comment literally says it. Set mine to !+Home::. 4. I still dont know what <yourdefault.png> is supposed to be in the .ps1 script but it doesnt seem to matter cause everything works. 5. I mistakenly changed "Shell.Application" to the path to my powershell script XD
    – Bwizz
    Mar 28, 2023 at 16:41
  • @Bwizz glad you're up and running. The "yourdefault" is whatever you'd like the file to be named if no name is passed in. Of course, if the autohotkey script works correctly it will pass in a filename ... so doesn't matter much ;)
    – noelicus
    Apr 17, 2023 at 17:04
0

This also works if you copy an image that is embedded in a document (e.g. OneNote or Word) to the clipboard: 1. Open Paint program. 2. Paste the clipboard. 3. Do a Save As to save the file as a jpg (for example) or any other listed format.

3
  • 1
    This doesn't actually answer the question. Based on the question, it is obvious that he knows that you can paste the screenshot in an external program. What he actually wants to know is that if it was possible to Paste a screenshot in Windows Explorer. May 21, 2016 at 9:09
  • 1
    Welcome to Super User! Please read the question again carefully. Your answer does not answer the original question.
    – DavidPostill
    May 21, 2016 at 9:49
  • Dang people can be mean here, and in this case "legalistic." His answer was helpful, in light of the lack of such a mainstream tool. Thanks for the answer sir. Looks like you avoided ever answering again, too bad some in the community have to always show how big they are by smacking down like this. Oct 2, 2020 at 15:49
-1

You can use xplorer2, it can directly paste clipboard image to explorer file

enter image description here enter image description here

2
  • Would the downvoters kindly care to explain what the problem is?
    – root
    Dec 13, 2021 at 9:50
  • The problem is you are using a simply program to solve your problem in one step instead of going through the 10 painful steps to solve it manually like your'e supposed to. ;) May 27, 2023 at 19:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .