Rename a file: Difference between revisions
Content added Content deleted
No edit summary |
|||
Line 148: | Line 148: | ||
[ "input.txt" "output.txt" move-file "docs" "mydocs" move-file ] with-directory |
[ "input.txt" "output.txt" move-file "docs" "mydocs" move-file ] with-directory |
||
] bi@</lang> |
] bi@</lang> |
||
=={{header|Fantom}}== |
|||
<lang fantom> |
|||
class Rename |
|||
{ |
|||
public class Void main () |
|||
{ |
|||
// rename file/dir in current directory |
|||
File.rename("input.txt".toUri).rename("output.txt") |
|||
File.rename("docs/".toUri).rename("mydocs/") |
|||
// rename file/dir in root directory |
|||
File.rename("/input.txt".toUri).rename("/output.txt") |
|||
File.rename("/docs/".toUri).rename("/mydocs/") |
|||
} |
|||
} |
|||
</lang> |
|||
=={{header|Forth}}== |
=={{header|Forth}}== |