//package com.eactive.eai.agent.makeDir;
//
//import java.io.File;
//import java.util.ArrayList;
//import java.util.Collections;
//
//import com.eactive.eai.agent.command.Command;
//import com.eactive.eai.agent.command.CommandException;
//import com.eactive.eai.common.property.PropManager;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import com.eactive.eai.inbound.remote.NDMTransferByScript;
//
//
//public class GetScriptListCommand extends Command
//{
//
//    /**
//	 * 
//	 */
//	private static final long serialVersionUID = 1L;
//
//	public GetScriptListCommand() {
//        super("GetScriptListCommand");
//    }
//
//    public Object execute() throws CommandException
//    {
//        Logger logger = LoggerFactory.getLogger(ElinkLogger.LOGGER_DEFAULT);
//        logger.info(this.name + " Agent 가 호출되었습니다.");
//
//        ArrayList<String> returnList = new ArrayList<String>();
//    	String sendShell = PropManager.getInstance().getProperty(NDMTransferByScript.PROP_GROUP_REMOTE_TRANSFER_NDM, NDMTransferByScript.PROP_NDM_SEND_SCRIPT_PATH);
//    	if ( sendShell == null ){
//            logger.error(this.name + "PROPERTY가 등록되어 있지 않습니다.[" + NDMTransferByScript.PROP_GROUP_REMOTE_TRANSFER_NDM + "],[" + NDMTransferByScript.PROP_NDM_SEND_SCRIPT_PATH + "]");
//    		return null;
//    	}
//
//    	File file = new File(sendShell);
//		String path = file.getParent();
//	
//		file = new File(path);
//    	
//		if ( file.exists() ) {
//			File[] tmplist = file.listFiles();
//    		ArrayList<File> al = new ArrayList<File>();
//    		for ( int inx = 0; inx < tmplist.length; inx++){
//    			al.add(tmplist[inx]);
//    		}
//    		
//    		Collections.sort( al );
//    			
//    		int len = al.size();
//    		File[] list = new File[len];
//    		for ( int inx = 0; inx < len; inx++ ){
//    			list[inx]=al.get(inx);
//    		}
//    		for ( int inx = 0; inx < list.length; inx++){
//    			file = list[inx];
//    			if ( file.isFile()){
//    				String fileName = file.getPath();
//    				if ( fileName.endsWith( ".sh" ) )
//    				{
//    					returnList.add( fileName );
//    				}
//    			}
//    		}
//		}
//		return returnList;
//
//    }
//
//}
