|
Pages: [1]
|
 |
|
Author
|
Topic: convert this batch code: type %0 > hello.txt? (Read 710 times)
|
|
wangChung
|
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? type %0 > hello.txt thanks for your time.
|
|
|
|
« Last Edit: December 20, 2005, 01:04:01 PM by wangChung »
|
Logged
|
|
|
|
|
CarlRead
|
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
|
%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
|
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]
|
|
|
 |