![]() Let sourceDirectory = archiveDirectory = txtFiles = Directory.EnumerateFiles(sourceDirectory, "*.txt") String fileName = currentFile.Substring(sourceDirectory.Length + 1) ĭirectory.Move(currentFile, Path.Combine(archiveDirectory, fileName)) String sourceDirectory = archiveDirectory = txtFiles = Directory.EnumerateFiles(sourceDirectory, "*.txt") After the files are moved, they no longer exist in the original directory. The following example shows how to retrieve all the text files from a directory and move them to a new directory.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |