【構想について】ファイル名・フォルダ名の文字列が一致→振り分け

標記の件、
以前にも同じ内容で質問させて頂いているのですが、「ファイル名・フォルダ名の文字列が一致した場合の振り分け」を行うロボットの構想でよい案があればご教示頂きたく存じます。

此方で、下記の組立で行ってみたのですが上手くいきませんでした。
①ForEachにより、元フォルダ内のPDFファイル名を取得繰り返し
→ファイル名の指定箇所6文字を抜き出し。
②ForEachにより、移動先フォルダ内のサブフォルダ名を取得繰り返し
→フォルダ名指定箇所6文字を抜き出し。
③条件分岐で①②で抜き出した文字列が一致する場合に、一致するサブフォルダに各々のファイルを移動させる。

※問題点:
◆②で各サブフォルダ名の取得
(式:System.IO.Directory.Getfiles(item=“C:\Users\furukawah\Desktop\親フォルダ”))→6文字抜き出し(Assign式:item6=mid(item,39,6))
で変数はitem,item6ともString型で統一しているのですがエラーが生じます。
◆③でIFまたはDowhileで一致する場合(Then)にMoveFileその特定のファイルを特定のサブフォルダへ移動させたいのですが、MoveFileには”特定の”ファイル、フォルダのパスを入力しないといけない為指定ができません。
下記のように○○○○(一致するコード文字列)に不特定多数の場所を指定するような入力方法はありますでしょうか?
(“C:\Users\furukawah\Desktop\○○○○_試験成績書”)

以上となります。
このような方法でなくもっと明快な組立方法があればご教示頂けたらと思います。宜しくお願い致します。

行いたいことのイメージ写真

Hello @Davidson!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff