in reply to Re^3: Reading every file in a directory
in thread Reading every file in a directory

Sorry about my vagueness, that code helps, but let me explain more, I'm totally lost as a noob. basically, there is 20,000 or so .yml files in the directory /home/gac3/plugins/Essentials/userdata/ these files contain a line labled login, that record the last login of a user, I need to take that timestamp, compare it to the current time, minus 5 days, so if the origin file has a user which has not logged in after 5 days, the .yml file is deleted. here is an example yml file.

timestamps: login: 1348876288937 logout: 1348876601161 lastteleport: 1348876478686 ipAddress: 192.168.1.1 lastlocation: world: Main_Flat2 x: -10.627933608068007 y: 38.9038268486379 z: -20.417177146511058 yaw: -192.60002 pitch: 24.150005 nickname: §lJack powertools: {} afk: false money: 0.0 homes: gf: world: Main_Flat x: -81.00634258469903 y: 50.0 z: 80.56448372272854 yaw: 238.24374 pitch: 78.49189

That line labled login, is what needs to be read, the script needs to read that line in every single file in the directory, all of which are the same format, and have that as a value which can then be compared. Any ideas ?