I want to move the last 5 digits of the pdf files in a folder to a separate file.
For example I have files like,
I want to move TA123-00000 and TA123202200000 to another file.
How can I do that?
Hope the following sample helps you.
In this case, dictionary will help you.
Sample20221215-5.zip (3.2 KB)
This sample use Copy instead of Move for testing. Please replace (enable) it with MoveFile
The above expression is as the following. Can you check this?
dict = files.GroupBy(Function(f) Strings.Right(System.IO.Path.GetFileNameWithoutExtension(f),5)).ToDictionary(Function(g) g.key,Function(g) g.ToArray)
Ok solved thank you.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.