08-26-2010 04:05 AM
:begin
move c:\Watchdog\Upload\* c:\temporales
ftp -v -i -s:ftpcmd.txt
del /Q c:\temporales\*.*
ping 1.1.1.1 -n 1 -w 10000
goto beginopen localhost
admin
admin
!:— FTP commands below here —
lcd c:/temporales
cd Alfresco
binary
mput "*.*"
bye 
					
				
		
08-28-2010 12:12 PM
08-30-2010 03:49 AM
 
					
				
			
			
				
			
			
			
			
			
			
			
		08-30-2010 04:30 AM
#!/bin/bash
FICHERO=prueba.txt
curl -u admin:admin -T $FICHERO ftp://localhost:1121/Alfresco/$FICHERO >/dev/null 2>&1
if [ $? -eq 0 ]; then
        echo "El fichero se ha subido correctamente."
else
        echo "ERROR en la subida del fichero."
fi
08-30-2010 06:05 AM
Muchas gracias, no sabia que existian aplicaciones que hicieran esto
08-30-2010 06:24 AM
08-31-2010 04:38 AM
Cesarista, yo prefiero en principio curl por razones de eficiencia y mayor control:
http://daniel.haxx.se/docs/curl-vs-wget.html
Un saludo.
09-01-2010 02:56 AM

# Log script output
LOGTO("C:\transfer_log.txt",APPEND)
$result=OPENHOST("localhost","admin","admin")
# Stop the script execution if not connected
IF($result!="OK")
        STOP
END IF
# Change current local directory to c:\mytempdir
$result=LOCALCHDIR("c:\temporales")
# Stop the script execution if could not
# change the current local directory
IF($result!="OK")
        STOP
END IF
# Change the current remote directory to
# /destination_remote_dir/
$result=CHDIR("/Alfresco/")
# Stop the script execution if could not
# change the current remote directory
IF($result!="OK")
        STOP
END IF
SETUPLOADMODE(DIRECT)
# Obtiene una lista de elementos 
GETLIST($list,LOCAL_FILES,"*.*")
# Por cada fichero en la lista $list…
FOREACH $item IN $list
       # Copiamos el fichero por ftp
       $result=PUTFILE($item)
       # Si se ha movido correctamente borramos el fichero       
       IF($result=="OK")         
         print("Fichero copiado correctamente. Borrando fichero….".$item)      
         $result = EXEC("del ".$item)         
         IF($result!=0)
            IF($result==1)
               print("No se ha encontrado el fichero. Errorcode: ".$result)
            ELSE
               print("El borrado ha fallado. Errorcode: ".$result)
               exit(1969)
            END IF
         ELSE
              print("El fichero se ha borrado con exito")
         END IF    
       ELSE
      print("Ha ocurrido un error moviendo el fichero ".$item)
      END IF
END FOREACH
CLOSEHOST
SLEEP(30)
goto :start
09-01-2010 03:56 AM
 
					
				
			
			
				
			
			
			
			
			
			
			
		09-02-2010 05:28 AM
 
					
				
				
			
		
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.