Rebol Talk Forum  |  REBOL Discussions  |  REBOL View  |  Topic: convert this batch code: type %0 > hello.txt?
Pages: [1] Print
Author Topic: convert this batch code: type %0 > hello.txt?  (Read 710 times)
wangChung
Newbie
*
Offline Offline

Posts: 2


View Profile
convert this batch code: type %0 > hello.txt?
« on: December 20, 2005, 01:02:02 PM »

hey, i'm new to all of this.  i was hoping somebody here could just convert this simple batch line of code into rebol for me?

Code:
type %0 > hello.txt

thanks for your time.
« Last Edit: December 20, 2005, 01:04:01 PM by wangChung » Logged
CarlRead
Full Member
***
Offline Offline

Posts: 105


View Profile
convert this batch code: type %0 > hello.txt?
« Reply #1 on: December 21, 2005, 02:04:45 AM »

Can you explain what it actually does?  The hello.txt is obviously a file name (and would be %hello.txt in REBOL), but the rest I'm not certain of, since I don't do batch processing.
 
Logged

- Carl Read
wangChung
Newbie
*
Offline Offline

Posts: 2


View Profile
convert this batch code: type %0 > hello.txt?
« Reply #2 on: December 21, 2005, 08:36:18 AM »

%0 is the current file.  this code just copies the contents of the current file (%0) into a new file named hello.txt.
Logged
Graham
Full Member
***
Offline Offline

Posts: 113


View Profile
Re: convert this batch code: type %0 > hello.txt?
« Reply #3 on: April 27, 2006, 02:45:27 AM »

as a function

foo: func [ filename [file!]
][
 write %hello.txt read filename
]

and used as

foo %filename

If you want to read and write binary files, use write/binary and read/binary
Logged

Pages: [1] Print 
Rebol Talk Forum  |  REBOL Discussions  |  REBOL View  |  Topic: convert this batch code: type %0 > hello.txt?
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 21, 2008, 07:42:12 AM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2292 Posts in 593 Topics by 3742 Members
Latest Member: CorHorgeExpex

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc