Jump to content

Changing The File Date of Photos


Recommended Posts

I'm having some trouble here changing the file date of photos in the Pictures library. I figured out how to get to the path

do

$folder=IniRead(@scriptdir&"\chagephotodate.ini","Folder","1","")



$folder=FileSelectFolder ( "Select the location of your photos","" ,2, $folder )

if @error then exitfunc()
    

if not StringInStr($folder,"\") then $folder = @UserProfileDir&"\"&$folder


$shortfolder=FileGetShortName($folder)



Run(@comspec &' /c start '&$shortfolder,@ScriptDir,@SW_HIDE)


$ret=MsgBox(4100,"ComputerHelp808.com","You wrote"&@CRLF&$folder&@CRLF&"Is this correct?")

    IniWrite(@scriptdir&"\chagephotodate.ini","Folder","1",$folder)

Until $ret=6

But after calling the func the photo date remains the same

I did search for a solution on the forum of course first

func changedate()


$folder=IniRead(@scriptdir&"\chagephotodate.ini","Folder","1","")

$day=IniRead(@scriptdir&"\chagephotodate.ini","Day","1",@MDAY)
$month=IniRead(@scriptdir&"\chagephotodate.ini","Month","1",@MON)
$year=IniRead(@scriptdir&"\chagephotodate.ini","Year","1",@YEAR)

    
    $var = FileSetTime($folder&"\*.jpg",$year&$month&$day)

    
if $var=0 then 
    
    msgbox(4096,"ComputerHelp808.com", "An error ocurred and your photo dates were not changed. Please restart the program and try again.")
    
exitfunc()

EndIf

EndFunc

I'm not getting an error. As far as the function goes it thinks it changed the date

Rick

Edited by tutor2000
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...