I am seeking a script

hello guys,
I decided to produce plots.
The resulting plots, for example, go to disk a. then imagine I want to send all files from disk a to disk b.
i read some topics some guys did that using rclone but honestly i dont understand well.
i am begineer with this job. can you teach me basicly please?
thank you.

If youā€™re using MadMax you can specify where to send the completed plots. Script is already within it

And your running Linux or windows?

oh maybe i write wrong.
example madmax generated plot and sended to a drive. i just seeking a script; its scan a drive and if a drive has any file ā†’ send file to b drive.

i am using windows , any idea?

click file, drag, drop.

For that on windows i was using robocopy iirc.
I dont currently have access to what i wrote though.
I found basic commands on the internet that worked well.

1 Like

thank you , i will check this.

1 Like

Just be aware, sometimes after it moves files it hides them, i believe there was an extra command needed to stop that happening for me.

thank you so much!
any other idea guys ?

I use two batch files, each running at the same time.

The first one moves plots from a location on one drive to a temporary location on another drive. The second one moves plots from the temporary location on the second drive to the final location on the second drive.

Each batch file is free-running, on a cycle, so that when it sees plot(s) it starts to move them from the first drive to the second drive, and then when the move is complete, they are moved to the final location.

Batch File 1;

@echo off
:RESTART
TITLE Move Plots from Drive1 to Drive2
echo.
ROBOCOPY "D:\ChiaPlots" "E:\ChiaXfer" "plot*.plot" /MOV /Z /R:999 /W:5
echo.
timeout 10 /nobreak
GOTO RESTART

pause

Batch File 2;

@echo off
:RESTART
TITLE Transfer Plots from temporary to final location
echo.
move "E:\ChiaXfer\plot*.plot" "E:\ChiaPlots"
echo.
timeout 10 /nobreak
GOTO RESTART

pause

Obviously you will have to use your own drive/path specifications in the files to suit your plot movement requirements.

Once these are both running, you can just leave them running until all your plots are moved. If new plots arrive in the source drive/folder, they get moved when they are fully copied into the source drive/folder. Once plots are fully moved from the source drive/folder to the destination drive/folder, they get moved to the final folder. If at any time the script runs when a plot copy is already in place (file locked etc) then the script will just fail to move the plots until the lock is released.

The /Z option in the ROBOCOPY command in the first batch file is ā€˜restartable modeā€™ which means if there is an issue moving the file from one location to another, it will retry, carrying on from where it left off rather than starting again from scratch. It will do this for up to 999 times (/R:999) and wait 5 seconds between retries (/W:5).

Using the /Z option is good for network file operations of large files, but it is slower than without it. If you are only doing local disk plot moves, you can remove the /Z option generally.

2 Likes

you are awesome!
please let me ask a few questions;
how can i run this command? i have to paste it on powershell ?

@echo off
:RESTART
TITLE Transfer Plots from temporary to final location
echo.
move ā€œE:\ChiaXfer\plot*.plotā€ ā€œE:\ChiaPlotsā€
echo.
timeout 10 /nobreak
GOTO RESTART

pause

would it be enough for me to just run this command for my scenario?

here is my scenario

example madmax generated plot and sended to a drive. i just seeking a script; its scan a drive and if a drive has any file ā†’ send file to b drive.

I read every word you wrote with all due respect.
thank you for your hard work.

Not Powershell, these are batch files. Although you can achieve the same with Powershell scripts, just not these ones.

Article that covers creating and running batch files here:

Assuming you always generate plots to the same drive and then want to copy from that drive to another, this is already build into MadMaxā€™s plotter.
You can use -t for temp drive/directory, -s for stageing drive/directory and -d for final drive/directory.
The stageing directory is the location where generated plots go first, from there to the destination directory.
I imagine you want to move plots quickly to a SSD/NVME drive to free up memory for a next plot, and while this next plot is running send the first one to a HDD, at least thatā€™s what I use it for;-)

Iā€™m not sure however if the -s parameter has made it to the current Windows build of MadMax plotter by Stotik.
If not maybe you can do a request on his Github page https://github.com/stotiks/chia-plotter

1 Like

hello,
thank you for help.
i just want double check;
when your plotter generate new plot file its generated a drive using -s command after that this new plot file going to b drive with -d command. is that correct?
thank you!

It would be better to post your script/batch file so we can look and not second-guess to give advice.

1 Like

hello, thank you for taking care of me.
honestly i dont have any script atm. I just try learn all options for me.
i will try your script firstly. If i need help may i contact with you ?

Just write down what it is your trying to do with a script. What program are you using to create plots? In that program (unknown at this time) there is a temp directory and a final destination directory.

I would look at this to help you out.
Release madMAx43v3r/chia-plotter build for windows v0.1.5 Ā· stotiks/chia-plotter Ā· GitHub
Nice GUI for Madmax plotting.

1 Like

Iā€™m curious about the /Z switch used here. Iā€™m getting painfully slow transfers over a gig to my NAS. Without /Z Iā€™m getting the expected transfer rate.

Why is the /Z option needed here?

/z Copies files in restartable mode. In restartable mode, should a file copy be interrupted, Robocopy can pick up where it left off rather than recopying the entire file.