Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 10 of 10

Thread: Search & Copy

  1. #1
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695

    Search & Copy

    Hi, I'm doing a search for a file(s) and the way I have this setup, it finds more than one instance of the file (temp Internet Files in this case). I find the files OK and extract the variable, but how can I copy to %srcdir% just one of these files. File.Copy or File.Rename isn't working because of the >1 files it finds. Is there a way I can stop the search if it finds the very first instance of the file? Or any other tips? Thanks.

  2. #2
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    Since File Search returns a delimited string, just copy or move the file from index 0 of that string.

  3. #3
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    Can you give me a kick start JimS? Never done the index 0 thing.

  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    you could parse the path\filename for the filename only, then use the wString DLL I wrote to remove the duplicates.

    wString
    Last edited by Worm; 10-30-2003 at 12:23 PM.

  5. #5
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    Here is a quick project to do it the way I was speaking of. Worm brings up a good point though; there is always more than one way to do something. You might want to try both ways and see what works best for your brain.
    Attached Files

  6. #6
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Defintely feeling the flow from JimS these days. Nice to have another member of the posse who isn't shy to Betty Crocker up some sample files from time to time.

    Corey Milner
    Creative Director, Indigo Rose Software

  7. #7
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    Both samples are great, thanks! Even if I don't use one or the other, still learning as I go here. I've gathered 10 pieces of info from those two files alone. Good stuff.

  8. #8
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038

    Just Spreading the Love

    Thanks for the nice words Corey. A few months ago when I was starting out with AMS, I had some big questions and wants myself. I stopped by here and was fortunate enough to get most of them answered by some super people. Thanks all you super people. A special big thanks goes out to Worm, he really went above and beyond to help me out. Since I haven’t been smart enough to help him out directly, I’m just doing what I can to help others. So far it’s still not much, especially compared to the help I received, but who knows maybe someday I’ll get at least even on the Karma thing.

    Besides that, if I help answer the easy ones, it might give Worm a little extra time to write another killer DLL.

  9. #9
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Worm's a hard guy to help, he never asks for anything. But I think he gets joy out of seeing people he helps in turn help others with their new found powers. That's just speculation though...

    Corey Milner
    Creative Director, Indigo Rose Software

  10. #10
    Join Date
    Aug 2003
    Location
    Maine, USA
    Posts
    1,695
    Besides that, if I help answer the easy ones, it might give Worm a little extra time to write another killer DLL.
    Couldn't have said it better myself!! Worm rules! And [you guys] aren't so bad yourselves

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts