home *** CD-ROM | disk | FTP | other *** search
Wrap
/* This script is for DirectoryOpus V4+ (not 5.0), it'll bring up a rename requester, with the files comment as content Need no arguments or flags, but RexxReqTools.library $VER: ComToName V1.0 (6-Jul-95) Allan Odgaard +--------------------------------------------------------------------------+ | This is supposed to work together with a "File_Id.Diz -> Comment" prg. | |(Check out my DizRespect.Exe which will strip any logo in the File_Id.Diz)| +--------------------------------------------------------------------------+*/ Options Results Call AddLib("rexxreqtools.library",0,-30,0) lf = '0a'x Status 3 ActiveWin = Result Status 13 ActiveWin DirPath = Result Query ScreenName PubScreen = Result Victims = 0 Loop: GetNextSelected Name = Result If Name = 0 Then Do If Victims > 0 Then Do Rescan;End;Exit;End Base = Left(Name,Length(Name)-Verify(Reverse(Name),'.',M)) Ext = Right(Name,Verify(Reverse(Name),'.',M)) Address Command 'C:List "'DirPath || Name'" LFormat %c >T:Comment.Tmp' Open('Com','T:Comment.Tmp','R') Comment = ReadLn('Com') Close('Com') Delete('T:Comment.Tmp') Ask: Busy On Call rtgetstring(Comment,"Enter New Name For: "Base,"Directory Opus Request","_Ok|_Skip|_Cancel","RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen) NewName = Result Busy Off If RTResult = 0 Then Do;If Victims > 0 Then Do;Rescan;End;Exit;End If RTResult = 2 Then Signal Skip Address Command 'C:Rename "'DirPath || Name'" "'DirPath || NewName || Ext'" Quiet' If RC > 19 Then Do Call rtezrequest("An error occured renaming" Name lf"Maybe the object name is invalid???","_Retry|_Skip|_Cancel","Directory Opus Request","RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen) If RTResult = 0 Then Do If Victims > 0 Then Do;Rescan;End;Exit;End If RTResult = 1 Then Do Comment = NewName;Signal Ask;End If RTResult = 2 Then Signal Skip End Victims = Victims + 1 Skip: SelectFile '"'Name'"' 0 1 Signal Loop