フォルダ内のファイルをすべて削除して、フォルダを空にしたいです。
こちらの場合は、 「PowerShellを呼び出し」アクティビティのプロパティ「TypeArgument」で、何を選択すれば良いのでしょうか?
また、こちらの場合は
[入力][DeleteDirectoryOption型]と設定して、「Value」には何を入力すれば良いのでしょうか?
教えてください。
どうぞよろしくおねがいします。
フォルダ内のファイルをすべて削除して、フォルダを空にしたいです。
こちらの場合は、 「PowerShellを呼び出し」アクティビティのプロパティ「TypeArgument」で、何を選択すれば良いのでしょうか?
また、こちらの場合は
[入力][DeleteDirectoryOption型]と設定して、「Value」には何を入力すれば良いのでしょうか?
教えてください。
どうぞよろしくおねがいします。
Hi @111561
If you have files within a folder then use the below code in Invoke Code activity
Dim directoryInfo As New System.IO.DirectoryInfo(folderPath)
' Delete all files in the folder
directoryInfo.GetFiles().ToList().ForEach(Sub(file) file.Delete())
If you have sub-folders within a folder then use the below code in Invoke Code activity
Dim directoryInfo As New System.IO.DirectoryInfo(folderPath)
' Delete all files in the folder
directoryInfo.GetFiles().ToList().ForEach(Sub(file) file.Delete())
' Optionally, delete all subdirectories as well
directoryInfo.GetDirectories().ToList().ForEach(Sub(subDir) subDir.Delete(True))
Give the arguments in below way
Hope it helps!!
できました!
ありがとうございます。
丁寧に教えていただいたことに感謝します。
いつもありがとうございます!
こちらの方法も試してみます。
ありがとうございます!
「フォルダー削除アクティビティ」は使ったことあります。
フォルダー削除だけでもいろんな方法があるのですね。
それぞれの利点を理解して、使い分けができるようになりたいです。
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.