Page 1 of 1

How to delete files from multiple folders using *.

Posted: Thu Jul 27, 2023 4:52 am
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

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

Posted: Thu Jul 27, 2023 7:30 am
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"

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

Posted: Fri Jul 28, 2023 3:07 am
by anthonyystwarty
Hello Oleg! You are incredible. Thank you very much. Your example worked perfectly.