This is my 'blpha_rand.bat' which is an improved version of 'alpha_rand.bat'

## Features ##
The script takes an input of an alphanumeric string and then randomizes it.
For larger strings gtr 40 char's, the count selected is random between 10-40.
Selected random char's are removed from the string, which is randomly 'flip-flopped' and rejoined.
In this way the original string 'shrinks' while the random string 'grows'.

The grown string is also randomly 'flip-flopped' as is the separator '_'
Characters in the grown string are 'unique' and occur only once in the original string.
For gtr 40 char strings, It is impossible to decypher the original string.
For leq 40 strings this could be possible though this would be 'collapsed'.

Finally sussed 'EnableDelayedExpansion' switch yahoo!!!

example:-

# title-name #
Archibalds.Adventures.v1.4.iPhone.iPod.Touch-iPWNPDA

# transforms #
einecuhrPi_WA_bd
A_cus_iin_be4hcoetn
ed_PPr_sTiWio1tn
u_e1v_hcoWl4d
N_PiA_Wd4cc1ni
iPNielhie_sd4chi_eP_v
ni_cit_ov_duhWaPPhbr
dTbicil_ot1v_hhP_naniPhoeio_s
eh_nvn_chioh_uNTudPP_so4icl_A1Pi
tee_Wrcioihssovvo1b_uh_ld_ic
d_hes_WTiicso
ui_oon_binhdhe
hnloPrNe_bc
aPPod_ohc_rAhn_tleiWinci_uu
so_vhn_hTil_NhuArn1ao
d4WdsaP_uhs_eAdi_viiPc1nto_ur
h4it_hnco_acoA_PPussreb
cni_tiou_hAvd_resisuh_nWoNdv_Pbolh
W_dicevci_dohos_PulvPb_PuhNarA_T4_ned
ddsi_eahr_ovb4ncii_Tchn
1_bai_heP_ihor_deNscvWiTui
d_ePn_aTvv_Piu_elPNrhn4td
4t_io1_vcoWlhhso
AcNn_uirl_4dc1_vheWdoiv



Randomising names less than 40 char's
]
Longer names are chopped to 40 char's, middle range
]

Titles are collapsed and if gtr 40 char's, have a random number between 15-40 selected, which acts as the cnt.
...
Then a random character is selected and removed from the original string.
Based on the current msec value, between 0-9, the strings are flip-flop'd when rejoined.
This is repeated until the cnt is reached.
...
Lastly the finished transformed name is displayed.

This contains unique char's from the original string, with no duplication, to the value of cnt:

]
This is pretty cool and I call it from my pack script long with 2 other routines for 3 different random sets of transformed title-names
[code]
:: Generate a random filename:- '6693_7_2_9_18151_1_2_15726_5' 'Rnmf2_nmf0i_CO0am_O2Smf_Riu'
IF /I "%TRANSALL%" == "YES" if %dizd% leq 30 ECHO alpha_rand ... %dizd% & call %SCRIPTLOC%\Batches\alpha_rand.bat
IF /I "%TRANSALL%" == "YES" if %dizd% geq 31 if %dizd% leq 61 ECHO file_rand ... %dizd% & call %SCRIPTLOC%\Batches\file_rand.bat
IF /I "%TRANSALL%" == "YES" if %dizd% geq 62 ECHO blpha_rand ... %dizd% & call %SCRIPTLOC%\Batches\blpha_rand.bat
[/code]


blpha_rand.bat
[code]
@echo off
BREAK ON
VERIFY ON

:: Create a random alphanumeric filename for a filename
:: Cheetah.DVD.Burner.v2.37-BEAN >>> tD3hr_2NauV_ChVEe_7tDeB_an2A

:: Localise variables and feed name from calling script
setlocal EnableDelayedExpansion & SET a_name=%ARCNAME%



::## t e s t #########################
SET a_name=Archibalds.Adventures.v1.4.iPhone.iPod.Touc h-iPWNPDA
::SET a_name=WinX.Player.3.1-CRD
::SET a_name=UKPitfall - Game PDA JAR
::## t e s t #########################



:: Set name to title value from pack etc
echo %a_name%>%temp%\a_name.txt


title transforming ... %a_name%
echo. & echo ----- A l p h a T r a n s f o r m v 2 ---------------------------
echo Title-name ... %a_name%

:: ================ FOR LOOP ================
for /f "tokens=*" %%a in (%temp%\a_name.txt) do set a_fn=%%a& call :no-chars
goto :end


:no-chars
:: Strip out . - _ char's
set a_fna=%a_fn:.=%
set a_fnb=%a_fna:-=%
set a_fna=%a_fnb:_=%
set a_fnb=%a_fna:"=%
set a_fna=%a_fnb: =%
echo Collapsed-name ... %a_fna%

:: trap for a null collapsed name 'ECHOisoff'
if "%a_fna%" == "ECHOisoff" echo ... #### is NULL ####

:: Get just no of chars in collapsed name
echo %a_fna%> %TEMP%\a_name.txt
dir %TEMP%\a_name.txt | find /i "File(s)"> %TEMP%\a_no-chars.txt

:: ================ FOR LOOP ================
for /f "tokens=*" %%b in (%temp%\a_no-chars.txt) do set a_cnt=%%~nxb
set dizb=%a_cnt:~-20%& set a_cnt=%dizb: =%
set a_cnt=%dizb:bytes=%& set dizb=

:: Get rid of CR/LF chars @ 2 bytes
if %a_cnt% gtr 2 set /a a_cnt=a_cnt-2
set a_cnta=%a_cnt%& set a_cntb=%a_cnt%

if %a_cnt% lss 40 echo. & echo No of char's ... %a_cnt% & echo.
if %a_cnt% geq 40 echo. & echo No of char's ... %a_cnt% so chopping to middle 40 & echo.

:: Chop name left-right @ cnta-40 char's and get a random value between 10-40 char's for cnt
if %a_cnt% geq 40 set /a a_posa=a_cnt-40
if %a_cnt% geq 40 set /a a_posa=a_posa/2
if %a_cnt% geq 40 if "%a_posa%" == "0" set a_posa=1
if %a_cnt% geq 40 set a_fnb=!a_fna:~%a_posa%,40!
if %a_cnt% geq 40 set a_fna=%a_fnb%

if %a_cnt% geq 40 set a_time_msec=
if %a_cnt% geq 40 call :get_chop_time
if %a_cnt% geq 40 if "%a_time_msec%" == "" set %a_time_msec%=40

if %a_cnt% geq 40 set a_cnt=%a_time_msec%& set a_cnta=40& set a_cntb=40& echo Randomly using ... %a_time_msec% char's & echo.
echo ... %a_fna%

set a_step_cnt=0
set a_rchar=d
echo ---------------------------------------------------------------------

:: ================ FOR LOOP ================
:: Step through cnt value from 1 to cnt increments of 1
for /l %%b IN (1,1,%a_cnt%) do set a_step=%%b& call :randomize
goto :eof


:randomize
if %a_step% gtr %a_cnt% goto :eof

:call_get_time
set a_time_msec=& set a_time_msecb=
call :get_time

:: Get the corresponding char value from fna; eg:- 5 == G etc uses 'setlocal EnableDelayedExpansion'
set /a a_posa=a_time_msecb-1
set a_rchar=!a_fna:~%a_posa%,1!
set a_fnb=!a_fna:~0,%a_posa%!
set a_fnc=!a_fna:~%a_time_msecb%!
:: echo msecb ... %a_time_msecb% a_posa ... %a_posa% a_rchar ... %a_rchar% a_fnb ... %a_fnb% a_fnc ... %a_fnc%

:rtot
:: Format output xxxxx_xxxxx.... up to cnt
set /a a_cnta=a_cnta - 10
if %a_cnta% leq 0 if %a_cnt% lss 40 set a_cnta=%a_cnt%
if %a_cnta% leq 0 if %a_cnt% geq 40 set a_cnta=40
if %a_cntb% leq 9 set a_cnta=1

:: Trap for a null random char from string
if "%a_rchar%" == "" goto :call_get_time

:: chop up a_fna string
if %a_time_msec% leq 4 set a_fna=%a_fnb%%a_fnc%
if %a_time_msec% geq 5 set a_fna=%a_fnc%%a_fnb%

:: 'randomise' everyting in da house Aie !
if %a_time_msec% leq 4 set a_rtotb=%a_rtotb%%a_rchar%
if %a_time_msec% geq 5 set a_rtotb=%a_rchar%%a_rtotb%
if %a_time_msec% leq 4 if "%a_step_cnt%" == "5" set a_rtot=%a_rtot%_%a_rchar%& set a_step_cnt=0& goto :rtot_end
if %a_time_msec% geq 5 if "%a_step_cnt%" == "5" set a_rtot=%a_rchar%_%a_rtot%& set a_step_cnt=0& goto :rtot_end
if %a_time_msec% leq 4 set a_rtot=%a_rtot%%a_rchar%& goto :rtot_end
if %a_time_msec% geq 5 set a_rtot=%a_rchar%%a_rtot%& goto :rtot_end

:rtot_end
title growing new name ... %a_rtot%

:: echo a_cnta ... %a_cnta% a_time_msec ... %a_time_msecb% a_rchar ... %a_rchar%

if %a_step% lss 10 echo %a_step% ... %a_fna%
if %a_step% geq 10 echo %a_step% ... %a_fna%
if %a_step% lss 10 echo - ... %a_rtotb%
if %a_step% geq 10 echo -- ... %a_rtotb%

:: traps and counts
set /a a_cntb=a_cntb-1
set /a a_step_cnt = a_step_cnt + 1

:: ### returning eof ###
goto :eof


:get_chop_time
:: Get random value between 10-40 for the cnt on title-name
set a_time=
set a_time=%TIME%
set a_time_secb=%a_time:~7,1%
set a_time_mseca=%a_time:~9,1%
set a_time_msecb=%a_time:~10,1%
set /a a_time_msec=a_time_msec + a_time_secb + a_time_mseca + a_time_msecb + a_time_msecb

if %a_time_msec% lss 10 goto :get_chop_time
if %a_time_msec% gtr 40 set /a a_time_msec=0& goto :get_chop_time
if not %a_time_msec% lss 10 if not %a_time_msec% gtr 40 goto :eof
goto :eof


:get_time
:: Use time msec value to get a rand no between 0-9
set a_time=
set a_time=%TIME%
set a_time_msec=%a_time:~10,1%
set /a a_time_msecb=a_time_msec + a_time_msecb
:: echo a_time_msecb ... %a_time_msecb%

if not %a_time_msecb% gtr %a_cnta% goto :get_time
if %a_time_msecb% gtr %a_cnta% if %a_time_msec% equ %a_time_msecb% set /a a_time_msecb=%a_time_msec%& goto :eof
if %a_time_msecb% gtr %a_cnta% if not %a_time_msec% equ %a_time_msecb% set /a a_time_msecb=a_time_msecb - a_time_msec& goto :eof
goto :eof



:end
echo ---------------------------------------------------------------------

title finished alpha-transform v2 ... %a_rtot%
echo Transformed-name ... %a_rtot% & echo --------------------------------------------------------------------- & echo.

:: Clear variables
set a_time_msecb=& set a_time_msec=& set a_rchar=& set a_fn=& set a_fna=& set a_step_cnt=& set a_cnt=
set a_time=& set a_step=& set a_name=& set b_cnt=& set a_fnb=& set a_fnc=& set a_cnta=& set a_cntb=& set a_time_secb=
set a_time_mseca=& set a_rtotb=& set a_posa=

if exist %temp%\a_name.txt del /f /q %temp%\a_name.txt > nul
if exist %temp%\a_no-chars.txt del /f /q %temp%\a_no-chars.txt > nul

:: Finish localisation and return variable(s)
endlocal & set file_rand=%a_rtot%

:: ########
::echo %file_rand%>> %temp%\rtot.txt
pause
:: ########
[/code]