Jump to content
Sign in to follow this  
tutor2000

Changing The File Date of Photos

Recommended Posts

tutor2000

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

Only $2.00 with Resale Rights How to Block Better for Martial Artists and NonMartial Artistshttp://kirkhamsebooks.com/MartialArts/Bloc...tterEbook_m.htm

Share this post


Link to post
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
Sign in to follow this  

×

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.