View Single Post
Old 01-16-2011, 02:31 AM   #83
m0ngr31
Connoisseur
m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.m0ngr31 could sell banana peel slippers to a Deveel.
 
Posts: 66
Karma: 3056
Join Date: Dec 2010
Device: Kindle Paperwhite
After I saw Kerenon's script to automatically add fake ASIN numbers to the books, I was motivated to write one for windows.

So here is a .bat file you can use to mass edit the meta info for your ebooks for windows:
Code:
@echo off & setLocal EnableDELAYedExpansion

set "asin1=B00"
set /a count=0
for /f %%a IN ('dir /b *.mobi') do (set /a count=count+1)
echo "Number of files: %count%"

set /a diff=((9999-%count%) - 1000) + 1
set /a divisor = 32767 / %diff%
set /a diff2=(999 - 100) + 1
set /a divisor2 = 32767 / %diff2%

:Random1
set /a asin2=%random% / %divisor%
if /i %asin2% GTR 9999 goto Random1
if /i %asin2% LSS 1000 goto Random1

:Random2
set /a asin3=%random% / %divisor2%
if /i %asin3% GTR 999 goto Random2
if /i %asin3% LSS 100 goto Random2
set /a temp1=!asin2!

for /f "delims=  " %%b IN ('dir /b *.mobi') do (
C:\Users\m0ngr31\Downloads\kindle\mobi2mobi.exe --outfile "%%b" --exthtype 113 --exthdata "!asin1!!asin3!!temp1!" "%%b"
C:\Users\m0ngr31\Downloads\kindle\mobi2mobi.exe --outfile "%%b" --addexthtype 501 --exthdata "EBOK" "%%b"
set /a temp1=!temp1!+1
)
This will just generate a random fake ASIN number for it to sync to. Just save this as a .bat file and run it in the directory where all your books are stored. The only thing you have to change is the directory where mobi2mobi is on both those lines at the bottom.

Let me know if it works
m0ngr31 is offline   Reply With Quote