1 | /*
|
---|
2 | rexx - Remove .CLASSINFO EA and set .TYPE EA
|
---|
3 | */
|
---|
4 |
|
---|
5 | call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
|
---|
6 | call SysLoadFuncs
|
---|
7 |
|
---|
8 | theFolder=ARG(1)
|
---|
9 |
|
---|
10 |
|
---|
11 | IF theFolder="" THEN DO
|
---|
12 | call usage
|
---|
13 | 'PAUSE'
|
---|
14 | EXIT
|
---|
15 | END
|
---|
16 |
|
---|
17 | SAY
|
---|
18 | SAY
|
---|
19 | call usage2
|
---|
20 | SAY
|
---|
21 | SAY 'Type Control-C to abort.'
|
---|
22 | 'PAUSE'
|
---|
23 |
|
---|
24 | rc=SySFileTree(theFolder'\*.mp3', 'mp3s', 'FSO')
|
---|
25 |
|
---|
26 | theType='DFFF00000100FDFF'x||'0300'x||"MP3"
|
---|
27 | DO a=1 to mp3s.0
|
---|
28 | /* Remove EA */
|
---|
29 | rc=SysPutEA(mp3s.a, ".CLASSINFO", '')
|
---|
30 | rc=SysPutEA(mp3s.a, ".TYPE", theType)
|
---|
31 | END
|
---|
32 |
|
---|
33 | rc=SySFileTree(theFolder'\*.wav', 'mp3s', 'FSO')
|
---|
34 | theType='DFFF00000100FDFF'x||'0300'x||"WAV"
|
---|
35 | DO a=1 to mp3s.0
|
---|
36 | /* Remove EA */
|
---|
37 | rc=SysPutEA(mp3s.a, ".CLASSINFO", '')
|
---|
38 | rc=SysPutEA(mp3s.a, ".TYPE", theType)
|
---|
39 | END
|
---|
40 |
|
---|
41 | rc=SySFileTree(theFolder'\*.ogg', 'mp3s', 'FSO')
|
---|
42 | theType='DFFF00000100FDFF'x||'0300'x||"OGG"
|
---|
43 | DO a=1 to mp3s.0
|
---|
44 | /* Remove EA */
|
---|
45 | rc=SysPutEA(mp3s.a, ".CLASSINFO", '')
|
---|
46 | rc=SysPutEA(mp3s.a, ".TYPE", theType)
|
---|
47 | END
|
---|
48 |
|
---|
49 | SAY 'Done.'
|
---|
50 |
|
---|
51 | EXIT
|
---|
52 |
|
---|
53 |
|
---|
54 | usage:
|
---|
55 | parse SOURCE . . theName
|
---|
56 | SAY
|
---|
57 | SAY
|
---|
58 | SAY 'Usage:'
|
---|
59 | SAY theName' <folder>'
|
---|
60 | return
|
---|
61 |
|
---|
62 | usage2:
|
---|
63 | SAY 'This skript removes the .CLASSINFO extended attribute from'
|
---|
64 | SAY 'the files inside the folder and all subfolders.'
|
---|
65 | SAY ''
|
---|
66 | SAY '[31;1;m****************************************[0;m'
|
---|
67 | SAY ''
|
---|
68 | SAY ' Track names of OGG and Wave files will be lost!'
|
---|
69 | SAY ''
|
---|
70 | SAY '[31;1;m****************************************[0;m'
|
---|
71 |
|
---|
72 | RETURN
|
---|
73 |
|
---|