#coding=utf-8
import arcpy
import os
arcpy.env.workspace = "[工作空间]"
FList = []
def file_name(file_dir):
File_List = []
for root, dirs, files in os.walk(file_dir):
for file in files:
File_List.append(file)
return File_List
FList = file_name("[文件目录]")#如,D:\\04DATA
for i in range(len(FList)):
input = "[输入路径]\\%s" %(FList[i])
output = "[输出路径]\\%s" %(FList[i])
arcpy.CopyRaster_management (input, output, "DEFAULTS", "0", "0")
print("处理完成")