How to delete files from multiple folders using *.

Discuss RoboTask here
Post Reply
anthonyystwarty
Posts: 47
Joined: Fri Dec 30, 2022 2:43 am

How to delete files from multiple folders using *.

Post by anthonyystwarty »

My greetings. It looks like an easy command, but I can't execute it. As an example I have the folder, c:\test1, c:\test2\, c:\test3...with several files in each folder, but I would just like to exclude them with the .mp3 extension...how do I do that? I thought that way...
In addition to the command below, I also tried , "...and I couldn't
Attachments
2023-07-27_00-41-25.png
2023-07-27_00-41-25.png (22.38 KiB) Viewed 4403 times
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: How to delete files from multiple folders using *.

Post by Oleg »

I also tried , "...and I couldn't
Why? I thied this, it works without problem
Look at my example. It works as designed: removes all *.TXT files from 3 folders to "Recycle bin"

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|444033236
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DisableOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task23"
Hide=INTEGER|0
ID=INTEGER|736587820
LogOnAsUser=INTEGER|1
Name=STRING|"delete files from several folders"
OnErrorTaskID=INTEGER|1879502808
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
StepPause=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER

[Actions\Action1]
ActionID=STRING|"A_FILE_DELETE"
Enabled=INTEGER|-1
Name=STRING|"Delete File"
Params=FOLDER

[Actions\Action1\Params]
Count=STRING|"3"
deletedirs=STRING|"0"
deletereadonly=STRING|"0"
file0=STRING|"C:\test1\*.txt"
file1=STRING|"C:\test2\*.txt"
file2=STRING|"C:\test3\*.txt"
hidden=STRING|"1"
subdir=STRING|"0"
system=STRING|"1"
ToRecycleBin=STRING|"1"
Oleg Yershov
anthonyystwarty
Posts: 47
Joined: Fri Dec 30, 2022 2:43 am

Re: How to delete files from multiple folders using *.

Post by anthonyystwarty »

Hello Oleg! You are incredible. Thank you very much. Your example worked perfectly.
Post Reply