home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
lfncall.zip
/
LFNCALL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-09-26
|
2KB
|
70 lines
/*
* LFNCall V 1.4
*
* Hilfsprogramm zum Umkopieren der Langnamendateien
* zum Bearbeiten und zum Zurückkopieren
* (c) 1997 Thomas Bohn, Vogelwiese 65, D-18435 Stralsund, Germany
*
*/
call RxFuncAdd 'SysFileTree', 'RexxUtil', 'SysFileTree'
'@Echo off'
'cls'
say''
say' ┌───────────────────────────────────────────────────────────────────┐'
say' │ LFNCall V 1.4 │'
say' │ (c) Thomas Bohn 1997 │'
say' │ Langnamen-Kopierprogramm │'
say' └───────────────────────────────────────────────────────────────────┘'
say''
parse arg Command Par
if Par=="" then exit
nLZPos=lastpos(' ',Par)
File1=left(Par,nLZPos-1)
File2=right(Par,length(Par)-nLZPos)
SELECT
WHEN Command=='/K' then do
say "Kopiere Langnamen-Datei zum Bearbeiten in temp. Verzeichnis..."
say "Copying file with long name to temp. directory..."
Copy File1 File2
end
WHEN Command=='/L' then do
Dir1='lfndir1.dat'
Dir2='lfndir2.dat'
'dir /N' File1 '>'Dir1
'dir /N' File2 '>'Dir2
Line1= LineIn(Dir1,1,1)
Line1= LineIn(Dir1,,1)
Line1= LineIn(Dir1,,1)
Line1= LineIn(Dir1,,1)
Line1= LineIn(Dir1,,1)
if substr(Line1,1,1) == " " then Line1= LineIn(Dir1,,1)
call stream Dir1, "C", "CLOSE"
Line2= LineIn(Dir2,1,1)
Line2= LineIn(Dir2,,1)
Line2= LineIn(Dir2,,1)
Line2= LineIn(Dir2,,1)
Line2= LineIn(Dir2,,1)
Line2= LineIn(Dir2,,1)
call stream Dir2, "C", "CLOSE"
if substr(Line1,1,26) <> substr(Line2,1,26) then do
say "Kopiere veränderte Datei zurück..."
say "Copying changed to original position..."
Copy File2 File1
call SysFileTree File1 'Test', 'T'
if (Test.0<>0) then del File2
end
else do
say "Datei unverändert - keine Aktion."
say "file unchanged - no action."
del File2
end
del Dir1
del Dir2
END
end
exit