Jump to content

Editing File Attributes


m.ike

Recommended Posts

I wanted to make something that would loop through a directory and change all the date created of a bunch of excel files but I could not for the life of me figure out a way to edit the attributes of a file. Is there any possible way to edit file attributes if not then do you guys have any suggestions on what to do?

Link to comment
https://forums.phpfreaks.com/topic/163473-editing-file-attributes/
Share on other sites

If you're using *nix, you should be able to call PHP's exec function to execute a command line utility called "touch" to modify the file dates.  For more info on exec:

 

http://www.php.net/exec

 

For more information on the touch command:

 

http://unixhelp.ed.ac.uk/CGI/man-cgi?touch

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.