I solved the with following codes.Zia try: import arcpy arcpy.env.workspace = r"L:/Test_input" rasterList = arcpy.ListRasters() ##Extract NDVI from HDF for raster in rasterList: tifOut="L:\\Test_out\\" + raster[9:-22] # SET OUTPUT DIRECTORY WITH FILE NAMES("2000193.h08v05") arcpy.ExtractSubDataset_management(raster, tifOut + ".tif", "0") except: print "Extract Subdataset example failed." print arcpy.GetMessages()