About the .txts, yes, definitely:
Code:
for /R %%f in (.) do (
for /F %%g in ('dir %%f/*.txt /A:-D /B') do (
rar a -r -m0 -ee -ep %%f\%%g.rar %%f\%%g
)
)
The docs for 'dir' says it accepts the wildcard, so we're hoping it should work
As for the error, what you could try doing is this:
Code:
for /R %%f in (.) do (
for /F %%g in ('dir %%f /A:-D /B') do (
echo Folder: %%f
echo File : %%g
echo Rar : %%f\%%g.rar
rar a -r -m0 -ee -ep %%f\%%g.rar %%f\%%g
echo "*****"
)
)
My suspicion is that the backslashes need to be escaped, but I don't know... This should at least indicate what it's trying to RAR. If this doesn't solve it, I'll boot to windows myself and play about 'till I can actually get it work :P