Analyzing files in a system folder, then deleting them?

Apr 9, 2011 at 6:30pm

Analyzing files in a system folder, then deleting them?

I’d like to incorporate a function into a patch that analyzes a folder on my system, if it’s over a certain size selectively delete the older files from this folder. I cannot find the best way to do this. I’ve got the filesys external but this only takes care of deleting files. Is there a way to do this without using the filedate object to look at every individual file in a folder?

#56194
Apr 9, 2011 at 7:24pm

if you are on a mac you can use [shell] or [aka.shell] for that…

hth ole

#201684
Aug 10, 2011 at 7:07pm

this is an addon to [mxj filesys]

public void size (String s) {

		File f = new File(MaxSystem.maxPathToNativePath(s));
 		outlet (0, (f.length()/1024));
 	}

it will spit the size of file when the input is [c:videofoo.avi]>[prepend size]>[mxj filesys]

Attachments:
  1. filesys.zip
#201685

You must be logged in to reply to this topic.