Multi Commander > Support and Feedback
delete certain files in multiple folders
karthik:
Hello,
I have a main directory, which has say 20 folders. Each folder has a certain set of files (*.txt,*.dat,*.xls, etc). Out of these 20 folders, I want to keep only *.txt in 15 of these folders (which I select) and delete the rest of the files in the 15 folders. The remaining folders, I don't want to be touched.
Currently, I just select the 15 folders, move it to a temp directory (and while moving give options so that the move command moves only *.txt) and the delete the source folders and then move the folders from the temp directory to my working directory.
Is there a easier way to do this in MC?
Thanks.
Mathias (Author):
Delete using filter is disabled since it is not fixed yet.. But you can use search..
Start Search panel
search for everything in the location you want to delete
Then right click on a .txt file an select "exclude .txt" and they are removed from search result.
sort by ext. (so that files and folders are not mixed.)
then select all files. (do not select the folders)
press delete to delete all the selected files. (what should be all files except the .txt file that you excluded)
karthik:
Thanks, Mathias.
The way you have mentioned, "search for everything in the location you want to delete" - the problem is the location has 20 folders and I want to search only in 15 folders. The search panel doesn't allow me to do search in multiple folders.
Thanks.
karthik:
Is there a way to do a scripting. If yes, just give some pointers and I will attempt to do it.
Mathias (Author):
--- Quote from: karthik on March 18, 2014, 03:19:18 ---The way you have mentioned, "search for everything in the location you want to delete" - the problem is the location has 20 folders and I want to search only in 15 folders. The search panel doesn't allow me to do search in multiple folders.
--- End quote ---
You can enter multiple paths and separate then with ";" eg "C:\MyFolder1;C:\MyFolder2;C:\MyFolder3"
Or you can exclude folders in the "Exclude filter box"
--- Quote from: karthik on March 18, 2014, 03:20:07 ---Is there a way to do a scripting. If yes, just give some pointers and I will attempt to do it.
--- End quote ---
There is some scripting.. But not sure if it helps
http://multicommander.com/docs/customcommands_list#mc.filesearch.search
or more advanced, scan the filesystem and find the file you want to delete your self
http://multicommander.com/docs/multiscript/functions/filesystem
Navigation
[0] Message Index
[#] Next page
Go to full version