Computer Science Canada
[Tutorial] File Manipulation
|Author:||gevorgkhc [ Sun May 16, 2004 11:03 pm ]|
|Post subject:||[Tutorial] File Manipulation|
Use the FileCopy command for this. The syntax is:
For example, if I wanted to copy yo.txt to blah.exe, I'll do:
Yes, you can copy other file formats to another!
If we wanted to rename a file, we would use the Name command. The syntax is:
For example, if I wanted to rename sup.txt to hello.html, I'll do:
You can always rename or copy any formats to another!
If we wanted to delete a file, we would use the Kill command. The syntax is:
For example, if I wanted to delete alpha.exe, I'll do:
I don't have to tell you about the formats again.....
To move a file or files, you first use the copy command and then the kill command. I hope I don't have to give a basic syntax of the two line. See "Copying File" and "Deleting File"
Ok this is an edit. If you want to check that the file was succefully copy is complete to prevent data loss, use the checking file section I just add to this tutorial as an edit and since I'm in a REAL hurry I can just give a quick example.
You'll understand it.
I'll create a folder manipulation and further file manipulation in another tutorial at another time(part 2).
|Author:||Tony [ Mon May 17, 2004 11:01 am ]|
When moving the file, it might be a good idea to check if the file was copied successfuly before deleting the original, to prevent accidental data lose.
Thx for the tutorial +25Bits
|Author:||TheXploder [ Thu Feb 17, 2005 10:26 pm ]|
how would I create a Folder?
|Author:||Tony [ Fri Feb 18, 2005 10:16 am ]|
you could use a shell command
|Author:||Brightguy [ Fri Feb 18, 2005 10:45 am ]|
|Post subject:||Re: [Tutorial] File Manipulation|
But wouldn't you need a program named mkdir to run?
Heh, there is actually a mkdir statement: