2ちゃんねる発『画像ビューア』作成スレ
■ このスレッドは過去ログ倉庫に格納されています
0085デフォルトの名無しさん
NGNGいや、ネタのつもりだったんだが...
Set Shell = CreateObject("Shell.Application")
Set BFF = Shell.BrowseForFolder(0,"どこのフォルダを見るん?",0)
If BFF is nothing then
Else
Set obj = CreateObject("Scripting.FileSystemObject")
Set obj2 = CreateObject("Scripting.FileSystemObject")
Set FW = obj2.CreateTextFile("Viewer.HTML")
call subFolder(obj.GetParentFolderName(BFF.Items.Item.Path),FW)
End If
Sub subFolder(FolderPath,FW)
Set FD = obj.GetFolder(FolderPath)
For Each FSO_File In FD.Files
If StrComp(Right(FSO_File.Name, 3),"JPG", 1) = 0 Or StrComp(Right(FSO_File.Name, 3),"GIF", 1) = 0 Or StrComp(Right(FSO_File.Name, 3),"PNG", 1) = 0 Or StrComp(Right(FSO_File.Name, 3),"BMP", 1) = 0 Then
FW.WriteLine ( "<IMG SRC=" & Chr(34) & FSO_File.Path & Chr(34) & "></br>" & FSO_File.Path & "</p>")
End If
Next
For Each FSO_SUB_FOLDER In FD.SubFolders
Call subFolder(FSO_SUB_FOLDER.Path,FW)
Next
End Sub
これでいいか?
■ このスレッドは過去ログ倉庫に格納されています