#!/bin/sh #============ get the file name ===========# FolderPath="/home/data" for fileName in ${FolderPath}/*; do tempFile=`basename $fileName` echo $tempFile done #==========================================#
该方法在后续的用于linux环境下测试会有帮助。
#!/bin/sh #============ get the file name ===========# FolderPath="/home/data" for fileName in ${FolderPath}/*; do tempFile=`basename $fileName` echo $tempFile done #==========================================#