home *** CD-ROM | disk | FTP | other *** search
RISC OS BBC BASIC V Source | 1995-12-02 | 1.1 KB | 55 lines |
- TidyDir 1.00
- (c) 02-Dec-1995 Ian Clark
- This prog Freeware
- Feel free to butcher this code however you like, but please don't
- distribute butchered code!
- $+" at line "+
- "TidyDir 1.00
- 1995 Ian Clark of RoosterPD"
- '"This short program scans a directory and tidies up file names."
- "Dir to scan=>"dir$
- Scan(dir$)
- Scan(path$)
- more%,num%,pressed%,ptr%,scan$,mem%,type%,x%,ftype%
- mem% 800
- more%=0
- &C,12,path$,mem%,16,more%,800,"*"
- ,,,num%,more%
- ptr%=mem%
- num%
- x%=1
- num%
- type%=ptr%!16
- ptr%+=24
- scan$=
- St(ptr%)
- ptr%=((ptr%+4)>>2)<<2
- "OS_CLI","Rename "+path$+"."+scan$+" "+path$+"."+
- Format(scan$)
- type%>=2
- Scan(path$+"."+scan$)
- more%=-1
- ptr%)
- ?ptr%>25
- tx$<255
- tx$+=
- (?ptr%):ptr%+=1
- Format(st$)
- out$,char%,x%
- char%=
- st$,1))
- char%>96
- char%<123 char%-=32
- out$=
- (char%)
- x%=2
- (st$)
- char%=
- st$,x%,1))
- char%>64
- char%<91
- char%+=32
- out$+=
- (char%)
- 8 =out$
-