Computercraft automatic enchantment sorter

01
local chest = peripheral.wrap("front")
02
print("Radcom's Enchantment sorter V1.2")
03
while true do
04
    sleep(1)
05
    for i = 1, chest.getInventorySize() do
06
        local item = chest.getStackInSlot(i)
07
        if item and item.ench then
08
            print("Found a ", item.name, " with an enchantment")
09
            print("Moving")
10
            chest.pushItem("south",i,1)
11
        else
12
            if item then
13
                print("moving: ",item.qty, " ",item.name)
14
                chest.pushItem("east",i,item.qty)
15
            end
16
        end
17
     end
18
end

Batch extract zip files

At work I needed to extract the contents from 600+ zip files to one place and select all, right click extract all did not work.
7-zip to the rescue, I used the command line version of 7-zip in a simple batch comand to loop through the files and extract each one
this code is written to be run from the same dir as the files to be extracted,
“C:\Program Files (x86)\7-Zip\7z” needs to be the location of the commandline version of 7-zip
“%CD%Backup files %x.zip” this the format of the files to be extracted in this case it was a series of sequentially numbered files all called “Backup files 1,2,3,etc”

It is run straight from the command prompt not as a batch script

“C:\extracted” is the destination of the extracted files
[code lang=dos]for /l %x in (1, 1, 100) do “C:\Program Files (x86)\7-Zip\7z” x “%CD%Backup files %x.zip” -oC:\extracted[/code]

all in all about 20 mins work to write and test