If file exists on cd then....

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • CelticDragon
    Indigo Rose Customer
    • Jun 2003
    • 87

    If file exists on cd then....

    Hi, I posted this on the general discussion board a while ago and didn't get any responses. Not trying to annoy people, just think that this could be a useful piece of code for people designing personalised cd roms, only i can't figure out the code!

    What I want to be able to do is create a cd (simple enough with AMS!) but not to finish it (burn it) so I can add one or more text and image files to personalise the cd. Ideally what I would like is that on the initialise of the parent page the program would search the cd to see if these files are on it, if not then it displays the standard text, if those files are there though it would display lines from the text file and change the image to the photo of the person you are sending the cd to (presuming of course that you have already placed both of these files on the cd and burnt it before sending to them.

    have tried to use
    %info% = File.Search("TestText.txt",Custom Paths) - With the custom path being %SrcDir% -
    IF (%info%=True)
    TextObject(Text1).SetText("File is here!")
    If (%info%=False)
    TextObject(Text1).SetText("File ain't here!")
    end if
    end if

    Anyone give me any pointers?

    What are people's views on this?

    Cheers
    Stephen
    If you can read this, i have yet to write a witty and imaginative signature.... sorry...
  • CelticDragon
    Indigo Rose Customer
    • Jun 2003
    • 87

    #2
    Re: If file exists on cd then....

    S'okay!

    Was messing about and managed to find the File existence command, apologies for the idiocy!

    Thank you
    If you can read this, i have yet to write a witty and imaginative signature.... sorry...

    Comment

    • Worm
      Indigo Rose Customer
      • Jul 2002
      • 3967

      #3
      Re: If file exists on cd then....

      %info% would not return a True/False. If the file was found, it would return the name of the file. If several were found, ( if you were searching sub folders too), then %info% would be a delimited list of the files.

      Try using a message box to show the value of %info% before your IF statements. I've found that using a message box to do a little debuggin will most of the time answer why my IF statements aren't working as I'd expect.

      Comment

      Working...
      X