Sha256: 47ce10df866524cf806ef2772a97a3cec4a115050ba29995e79c1d6f7c9b326f

Contents?: true

Size: 403 Bytes

Versions: 5

Compression:

Stored size: 403 Bytes

Contents

# frozen_string_literal: false
#
# You need WSH(Windows Scripting Host) to run this script.
#

require "win32ole"

def listup(items)
#  items.each do |i|
  for i in items
    puts i.name
  end
end

fs = WIN32OLE.new("Scripting.FileSystemObject")

folder = fs.GetFolder(".")

puts "--- folder of #{folder.path} ---"
listup(folder.SubFolders)

puts "--- files of #{folder.path} ---"
listup(folder.Files)

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
win32ole-1.9.0 sample/win32ole/oledirs.rb
win32ole-1.8.10 ext/win32ole/sample/oledirs.rb
win32ole-1.8.9 ext/win32ole/sample/oledirs.rb
win32ole-1.8.8 ext/win32ole/sample/oledirs.rb
ruby-compiler-0.1.1 vendor/ruby/ext/win32ole/sample/oledirs.rb