SCOUG-Programming Mailing List Archives
Return to [ 10 |
April |
2005 ]
<< Previous Message <<
Content Type: text/plain
Peter,
I use this in some of my rexx programs to delete files before I remake them.
call lineout OutFile /* makes sure the file is closed */
'@del' OutFile '> nul' /* deletes the file if it exists */
So I tried it (one time) on testfile.txt by running renTest.cmd:
/* renTest.cmd */
'@ren testfile.txt testfile.xtx'
and it worked. That may be your solution.
Note: In my production code above OutFile is a variable. That is why it is not in the quotes. That
fact may be of use to you if you want to programmaticaly (sp) change file names.
Sheridan
Peter Skye wrote:
> Is there a Rexx function to rename a file? (I can't find one.)
>
> I know I can say
>
> "ren fileX fileY"
>
> but I'd prefer a Rexx function if one exists.
>
> - Peter
>
>
>
> =====================================================
>
> To unsubscribe from this list, send an email message
> to "steward@scoug.com". In the body of the message,
> put the command "unsubscribe scoug-programming".
>
> For problems, contact the list owner at
> "postmaster@scoug.com".
>
> =====================================================
>
>
>
>
>
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"postmaster@scoug.com".
=====================================================
<< Previous Message <<
Return to [ 10 |
April |
2005 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
|