Thanks Curtis, but I used "dir" many times in the same way and it works well.
However, I changed some things and also I found the main error was that I have to do Float -> Raster and then Raster -> Integer. Another error was that "ArcToolBox help" indicate "Int" (for scripts) but Python doesn't reconize, instead of that Python accept "arcpy.gp.Int_sa" for Integers.
Now, It works excellent manually with ArcToolbox and in python with only one file, however when I put "for" I have an error ("pythonw.exe has encountered a problem and needs to close. We are sorry for the inconvenience"). Rarely, I tested the same code in other computer .... and voila!!! it's ok!!!
Anybody knows what's wrong?
Here it's my code:
# Import arcpy module
import arcpy
import sys
import string
import os
from arcpy import env
from arcpy.sa import *
# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")
path="D:/Documents and Settings/mcarbajal/My Documents/"
ruta=path+"gridss/"
try:
for n in range(1,13):
inFloat=ruta+"grid"+str(n)+".flt"
outRaster=ruta+"grid"+str(n)+"_rt"
outInt=ruta+"grid"+str(n)+"_int"
# Process: Float to Raster
arcpy.FloatToRaster_conversion(inFloat,outRaster)
arcpy.gp.Int_sa(outRaster,outInt)
print n
except:
#print error message if an error occurs
print arcpy.GetMessages()