Topic: Working with files.
Example-1: To delete a file.
Result: This example will do the similar thing: it will delete a file, but not a folder.
Example-2: To copy a file to a different location
Result: It will copy a file to the location “D:\\” and renames file as “test.txt”.
Example-3: Or you can use move method instead of copy method
Result: It will move a file to the location “D:\\” and renames file as “test1.txt”.
Example-4:
Result: you can see a path of selected file.
Example-5:
Result: you can see an extension of selected file.
Example-6:
Result: you will get a file name of a selected file with its extension.
Example-7:
Result: you will get a file name of a selected file without its extension.
Переглядів: 175 |