#scans working directory for files to process
#ADMIN_filelist_sh
#Set path variable
vPath=/directory_to_scan
#Remove ADMIN_filelist
rm -f $vPath/ADMIN_filelist
rm -f $vPath/ADMIN_filelist_prep
rm -f $vPath/ADMIN_filelist_rename
rm -f $vPath/ADMIN_filestats
rm -f $vPath/ADMIN_filelist_move
#Rename file in current directory with spaces
find $vPath/. -name "* *"|while read file
do
#vFile=$vPath/$file
mv "$file" "`echo "$file"|sed 's/ /##/g'`"
done
#Create ADMIN_filelist
find $vPath/. -maxdepth 1 -type f -printf %f\\n>>$vPath/ADMIN_filelist
#Adjust file permissions
#chmod 666 $vPath/ADMIN_filelist