Các bạn đang cố di chuyển tất cả các tệp kết thúc bằng _DONE vào một thư mục khác.Di chuyển các tệp từ một thư mục này sang thư mục khác C#
tôi đã cố gắng
//take all files of main folder to folder model_RCCMrecTransfered
string rootFolderPath = @"F:/model_RCCMREC/";
string destinationPath = @"F:/model_RCCMrecTransfered/";
string filesToDelete = @"*_DONE.wav"; // Only delete WAV files ending by "_DONE" in their filenames
string[] fileList = System.IO.Directory.GetFiles(rootFolderPath, filesToDelete);
foreach (string file in fileList)
{
string fileToMove = rootFolderPath + file;
string moveTo = destinationPath + file;
//moving file
File.Move(fileToMove, moveTo);
Nhưng trên thực hiện các mã tôi nhận được một câu nói lỗi.
The given path's format is not supported.
Tôi đã gặp sự cố ở đâu?
Tôi không chắc liệu tệp truyền trong cửa sổ có hỗ trợ '_' – Rohit