Jump to content

Recommended Posts

Posted

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.

Posted (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 by weaponx
Posted

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.

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
×
×
  • Create New...