fhanna Posted November 8, 2007 Posted November 8, 2007 I would like to determine if a file exists, if so, retrieve the Comments, and if the Comments do not match my criteria, save the file with a new name and providing text to the new file Comments property. Know how to do all except retrieve the file Comments property and save a file with Comments. Any suggestins and support is greatly appreciated. Thanks again for this forum.
Developers Jos Posted November 8, 2007 Developers Posted November 8, 2007 Did you try: FileGetVersion ( "filename" [,"stringname"] ) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
weaponx Posted November 8, 2007 Posted November 8, 2007 (edited) More specifically: $testString = "bla bla bla" $fileName = "somefile.doc" If FileExists($fileName) Then $comments = FileGetVersion ( $fileName, "Comments") If $comments <> $testString Then MsgBox(0,"","File does not match") ;Set comments???? FileMove($fileName, $outfileName) EndIf EndIf Edited November 8, 2007 by weaponx
fhanna Posted November 8, 2007 Author Posted November 8, 2007 Thank you for the post. Close but not what I was looking for. Want to retain original file and create a new file with new Comments. Sorta like this: A file exist. If the Comments match a criteria then a new file will be created; old file will remain intact and the new file will have comments provided in the Comments field. Was thinking on the order of _GetExtProperty function and whatever is needed to add Comments to newly created file. Thanks again.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now