23 lines
477 B
Plaintext
23 lines
477 B
Plaintext
|
console.write("Type Source: ");
|
||
|
a = console.readln();
|
||
|
console.write("Type New Path For File With Filename: ");
|
||
|
b = console.readln();
|
||
|
|
||
|
src=fs.openread(a);
|
||
|
if(src)
|
||
|
{
|
||
|
dest = fs.create(b);
|
||
|
if(dest)
|
||
|
{
|
||
|
array = create.array(1024);
|
||
|
read = 0;
|
||
|
do(read > 0)
|
||
|
{
|
||
|
read=src.read(array,array.length);
|
||
|
dest.write(array,read);
|
||
|
}
|
||
|
dest.close();
|
||
|
}
|
||
|
src.close();
|
||
|
}
|
||
|
console.writeln("Copied " + a + " => " + b);
|