Challenge:
Winner?:
Yes
Code Snippet:
path$=cl$() if path$>"" do inc n character$=left$(right$(path$,n),1) if character$="\" then exit loop filename$=left$(right$(path$,n-1),n-2) open to read 1,filename$ dim storeline$(20) repeat inc linenumber for commandnumber=1 to 25 read string 1,stuff$ if stuff$>"" then storeline$(linenumber)=storeline$(linenumber)+stuff$+":" if stuff$="" and file end(1)=0 then dec commandnumber next commandnumber until file end(1)=1 close file 1 if file exist (filename$+"_compressed.dba") then delete file filename$+"_compressed.dba" open to write 2,filename$+"_compressed.dba" for printline=1 to linenumber write string 2,storeline$(printline) next printline close file 2 print "Code was compressed into ",linenumber," lines. Have a nice day." wait key endif