diff --git a/examples/dsfiles.py b/examples/dsfiles.py
index <HASH>..<HASH> 100755
--- a/examples/dsfiles.py
+++ b/examples/dsfiles.py
@@ -28,10 +28,10 @@ class DatastoreFiles(BaseScript):
     def list_files(self):
         for o in self.vim.find_entity_list('Datacenter', properties=['name', 'datastore']):
             print "Datacenter:", o.name
-            ds = self.vim.get_views(o.datastore, properties=['name', 'browser'])
+            ds = self.vim.get_views(o.datastore, properties=['info', 'browser'])
             for d in ds:
-                print "Datastore:", d.name
-                root_folder = "[%s] /" % d.name
+                print "Datastore:", d.info.name
+                root_folder = "[%s] /" % d.info.name
                 task = self.vim.invoke_task('SearchDatastoreSubFolders_Task',
                         _this=d.browser,
                         datastorePath=root_folder)
@@ -41,8 +41,11 @@ class DatastoreFiles(BaseScript):
                     # not a data object, so skip over it
                     for result in array_of_results[1:]:
                         for r in result:
-                            for f in r.file:
-                                print "%s%s" % (r.folderPath, f.path)
+                            try:
+                                for f in r.file:
+                                    print "%s%s" % (r.folderPath, f.path)
+                            except AttributeError:
+                                pass
 
 
 def main():
Use info as name is not set (on ESX <I>), I will soon be able to work agains ESX 4.x servers. Catch AttributeError when no file has been set.