Please Read: Significant Update Planned, Migrating Forum Software This Month

See more
See less

Lopp script

  • Filter
  • Time
  • Show
Clear All
new posts

  • Lopp script

    Guys can anyone help out with this one:

    I need to add some kind of a loop into a script to run it continuously. The script will move data over from one folder to another. I'd need to the script to either run continuously or say every 5 minutes without hammering the processor on the server.

    Any ideas as I donít now where to start. Ideally a software GUI would be perfect to run the script as my scripting skills arenít brilliant.

  • #2
    Re: Lopp script

    There is a robocopy gui tool here:

    If you wanted to go the script route, you could do something like this and just make it a scheduled task:
    Note** You would have to change the switches to suite your needs.

    SET _source="//source/share"
    SET _target="//target/share"
    set _what=/COPYALL /B /SEC /MIR
    set _opt=/R:0 /W:0 /LOG:migrate.log /NFL /NDL
    set _excludes=/XD %3 %4 %5 %6 %7 %8 %9
    ECHO Migrating from %_source% to %_target%...
    robocopy %_source% %_target% %_what% %opt% %_excludes%
    if errorlevel 16 echo ***FATAL ERROR***  & goto end
    if errorlevel 8  echo **FAILED COPIES**  & goto end
    if errorlevel 4  echo *MISMATCHES*       & goto end
    if errorlevel 2  echo EXTRA FILES        & goto end
    if errorlevel 1  echo Copy successful    & goto end
    if errorlevel 0  echo --no change--      & goto end


    • #3
      Re: Lopp script

      Thanks for that, Iíve been looking at robocopy which looks like it should be up to the job. Iíve had a read through the manual and I recon it should cover what I need. The only thing I was unable to find was a verify or data integrity checker in there. Iím sure someone said it could do this.

      When users upload files into an FTP folder (Windows explorer, drag & droop method) I need the data to be checked for integrity some how. I have noticed in testing if the internet connection is dropped at the users end mid way through an upload sometimes the files are put onto the server but they appear to be corrupt as not all the data is present in the file. Is there any way of checking the data integrity of the file?