Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Set first image as Folder preview.

18 Jun 2012   #1
ibimed

Windows 7 Ultimate x64
 
 
Set first image as Folder preview.

Hi,

So i want to know if i can set first image of each folder as the preview image.

example of what i want:
images in my folder:
View image: images

what it shows:
View image: what it shows

what i want:
View image: what i want

I know i can rename my image as folder.jpg in each folder but i have like 300 folders or even more.

thanks!


My System SpecsSystem Spec
.
19 Jun 2012   #2
Arc

Microsoft Community Contributor Award Recipient

Microsoft Windows 10 Pro Insider Preview 64-bit
 
 

Possible. if somebody can make a script which will rename all the picture folders first images auto rename to folder.jpg.
My System SpecsSystem Spec
19 Jun 2012   #3
ibimed

Windows 7 Ultimate x64
 
 

yes, that will be great too
My System SpecsSystem Spec
.

20 Jun 2012   #4
Arc

Microsoft Community Contributor Award Recipient

Microsoft Windows 10 Pro Insider Preview 64-bit
 
 

My System SpecsSystem Spec
20 Jun 2012   #5
Duzzy

Windows 7 Ultimate x64
 
 

As Arc's link lacked the code to rename the files and I had already got the basics working I thought I would still post my script.

This poor script I wrote will rename the first file to folder.jpg in all subfolders in the folder it is placed. It will only do it alphabetically (A-Z) regardless of the file sorting you have set, eg. "A" would be renamed. It also does not check if the file is a .jpg but it does check if the file "folder.jpg" already exist.

Recommend testing on a several subfolders copied to a test folder first. If you want to run it from any location you can put a path and folder name in, just change the bolded text (".\") to your folders path for example, "C:\My Pictures".

There is also a small safety net in the script, it will ask to confirm you want to run it and require you to type the word "Yes" so you should not be able to accidently run it in the wrong location as is it works on all subfolders in the folder it is placed or all subfolders of the path you put in.

You DO NOT want to run this on the wrong folder.

Copy the code to notepad and save as FILENAME.vbs then double click to run it. It will display a message when finished.
Code:
strConfirm = InputBox("Are you sure you want to proceed?" & Chr(13) & Chr(13) & "Enter Yes to proceed", _
 "Confirmation", "No")
 
If strConfirm = "Yes" Then
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    
    objStartFolder = ".\"
    ShowSubFolders objFSO.GetFolder(objStartFolder)
    WScript.echo "Finished"
Else
    WScript.echo "Cancelled"
End If

Sub ShowSubFolders(Folder)
    For Each Subfolder in Folder.SubFolders
        Set objFolder = objFSO.GetFolder(Subfolder.Path)
        Set colFiles = objFolder.Files
        
        If Not objFSO.FileExists(objFolder & "\" & "folder.jpg") Then
            For Each objFile in colFiles
                objFSO.MoveFile objFolder & "\" & objFile.Name, objFolder & "\" & "folder.jpg"
                Exit For
            Next    
        End If
        
        ShowSubFolders Subfolder
    Next
End Sub
My System SpecsSystem Spec
20 Jun 2012   #6
ibimed

Windows 7 Ultimate x64
 
 

it worked perfectly thanks !
My System SpecsSystem Spec
20 Jun 2012   #7
Duzzy

Windows 7 Ultimate x64
 
 

No problems and good to hear it worked perfectly.
My System SpecsSystem Spec
Reply

 Set first image as Folder preview.




Thread Tools




Similar help and support threads
Thread Forum
Image preview missing
Hello, when I try to attach a file or upload one to a site, I cannot preview the file as I used to earlier today. I see only a Windows default image (attached), but when I right click the image on Windows Explorer and choose Preview, I get the real picture. Thanks, Luis.
Music, Pictures & Video
explorer folder preview image issue
Hello all! This is admittedly a minor issue but it's becoming more of an annoyance. With my picture containing folders, I like to know what's in each folder by having a preview image. The default seems to be to show a few images from the folder, which at that size is hard to see anything, so I was...
General Discussion
Preview image shortcut Windows 7
Hi guys, I'm very keyboard oriented and I'd like to know if anyone knows of a way to add a shortcut for "Preview", that is of course if there isn't already one (I've searched/Google but I came up empty) Here is an image that shows what I'd like to have a shortcut for. I'm quite surprised that...
Music, Pictures & Video
Preview looks warmer than the image actually is
Wasn't sure where I should post this as I'm not sure where the issue lies. Whenever something is in "preview" mode or is windowed as opposed to full screen, it appears much warmer than it should. It happens with picasa, photoshop and any games that I play however my web browsers are not affected....
Graphic Cards
Image Preview in Win7
Hi all, I have looked up at all possible solutions in this Forum but unable to resolve this issue. I am unable to Preview any images as displayed in http://i.imgur.com/UUwTZ.jpg Steps followed: 1. Always show icons is disabled in Folder options. 2. Default program for Image is...
Music, Pictures & Video
no image preview - help
I can't make my photos preview. When I go to "My pictures" all I see is only the program's icon (I currently use irfanview) instead of the mini pic as it should, so to know the photo. All I get is this: http://img169.imageshack.us/img169/6435/clipboard01ik.jpg no mini preview of my photos!...
Music, Pictures & Video


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 02:43.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App