ファイル名の変更およびフォルダ移動に関して

こんにちは、ファイル名の変更およびフォルダ移動に関して質問がございます。
所定のフォルダに複数ファイル(ファイル名:ファイルA~ファイルC)が存在し、
データテーブルで下記のようなデータテーブルがあるとします。
旧ファイル名 新ファイル名 移動フォルダ
A AA AAA
B BB BBB
C CC CCC

この時、
①旧ファイル名を新ファイル名に変更
②用意された別フォルダ(元々ある移動フォルダ)に移動
を行いたいです。

アプローチとして、繰り返しコレクションの各要素でファイル名を取得して旧ファイル名をキーに新ファイル名に変更する(つまり処理①)までは実施できたのですが、②の実装がうまくいきません。原因は①でitemに格納されたファイル名が変更されているためです。(当然ですが)

スムーズな解決方法があればご教示いただきたいです、よろしくお願いいたします。

HI @Tomoya

Correct me if iam wrong

You need to move a folder to another folder with the new folder name , right?

Regards
Gokul

No, rename the file and move it to a folder that is already prepared.

Okay so you can try this as in this thread

Instead of renaming in the same folder you can simply use move file and give the new name there like this
image

Regards
Gokul

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.