Re: Re: New Version 11.5
By: Mro to Dreamer on Sun Nov 03 2013 07:05 pm
He's likely saved at least a handful of others from having to write a
batchfile themselves, and so long as one or two find it useful, what's
the hurt in distributing?
go look at it for yourself.
I did, he's also distributing a copy of PKZIP.EXE which last I checked was copyrighted software, but 1993, is 2.04g considered freeware now?
Also I'd personally be worried that someone might try these .bat files and end up hosing their system.
Might want to consider adding to the readme something like "Backup your system before using."
I'd also maybe add some "if exists" lines to make sure you don't accidentally do something that puts something in the wrong place.
Also you use a set command to set sbbsctrl to c:\sbbs\ctrl\. Well, what if I have my bbs in c:\sbbs3 or d:\sbbs\? Ya just changed my enviornment variable.
If you're gonna change directories, you should try returning the user to whatever folder they called the .bat file from.
Use:
set olddir=%CD%
...at the beginning of your bat, then when you're done just...
cd /d %olddir%
...to go back.
Ton of explicit directory paths, would be better to find pkzip or test to see if pkzip is in the system path instead of requiring users to move files into other folders.
yeah, by the time I would get this working on my system I don't know I wouldn't be able to figure out everything on my own.
You call DELFILES without much explination of what you're deleting.
...
I made some changed that figures out where all the files are, that way you can just extract all the files into their own folder (anywhere on the sytem) and just run filelist <filebasename>
Who puts ECHO Y | DEL *.* into a batch file? What if some weird circumstance occured and the batch file happened to be in c:\ when that command was called?
--clip--
@ECHO OFF
exit
if %sbbsctrl%=="" goto error1
if %1=="" goto error2
SET BBSNAME=PARKAVE
SET olddir=%CD%
CD %sbbsctrl%
for %i in (addfiles.exe) do @set tempexe=%~dp$PATH:i
CD /D %tempexe%
ADDFILES * -L FILES -S -N -Z -X "Sysop"
for %i in (delfiles.exe) do @set tempexe=%~dp$PATH:i
DELFILES * -NOT UPLOADS -NOT PRIVATE -OFF -NOL
for %i in (DUPEFIND.exe) do @set tempexe=%~dp$PATH:i
CD /D %tempexe%
DUPEFIND 1 1
for %i in (FILELIST.exe) do @set tempexe=%~dp$PATH:i
CD /D %tempexe%
FILELIST * -LIB FILES -NOT UPLOADS -NOT SYSOP -CAT -HDR -CDT -ULD -DLS -NOE -JST %BBSNAME%.TXT
COPY %BBSNAME%.TXT %sbbsexec%\..\DATA\DIRS\%1
MOVE %BBSNAME%.TXT %olddir%
CD /D %olddir%
for %i in (pkzip.exe) do @set tempexe=%~dp$PATH:i
%tempexe%\PKZIP -EX %BBSNAME% BBSLOGO.ANS BBSLOGO.ASC FILE_ID.DIZ %BBSNAME%.TXT MOVE %BBSNAME%.ZIP %sbbsexec%\..\DATA\DIRS\%1
rem you should never do this in a batch file:
rem ECHO Y|DEL *.*
del %bbsname%.txt
echo done...
exit
:error1
echo SBBSCTRL folder not set. Using Synchronet?
pause
exit
:error2
echo You need to pass the filearea data path.
echo for instance if you want this file posted to the MFL filearea
echo then run FileList.bat MFL
pause
exit
--clip--
Either way I don't think I'd run this on my system, too many possible bad things....
man this standard time is messing with my head.
--
Andy/Android8675
---
þ Synchronet þ Shodan's Core - shodan.synchro.net