guys. I've got a problem I can't solve: I have a 2 folders I choose with folderBrowserDialog and tons of files in source directory I need to move to the target directory. But, I have only to move files with a specific extension like .txt or any other extension I can get from textbox. So how can I do it?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Try this:
For copying files...
for moving files
Example for Moving files to Directory:
will
Move
all thefiles
from Desktop to Directory "TextFiles
".First get all the files with specified extension using Directory.GetFiles() and then iterate through each files in the list and move them to target directory.