Author Topic: Search path...  (Read 12554 times)

0 Members and 1 Guest are viewing this topic.

CADDOG

  • Newt
  • Posts: 82
  • wishbonesr
Re: Search path...
« Reply #15 on: July 23, 2013, 02:03:38 PM »
I'm such a noob here, and will probably shoot myself in the foot as good judgement tells me to bite my tongue...

Publishing is king, as owen has stated.  And that applies to algorithms as much as code.
For instance, I believe I was the first to publish an Autolisp MergeSort stable algorithm, however I can only claim the implementation based on Ellis Dee's vb implementation

If either one of you guys were to walk away from this site would be tragic.  Come on.  This isn't adndevblog  :angel:

But here's some food for thought.
I've done it before (arrived to code that was near identical to someone else’s) with no intention whatsoever.  However, what influenced the design was that of previous optimization efforts I observed;  Because.....

This site has really transformed v-lisp knowledge and optimization is a constant competition.  Ultimately this site has exposed best practices, even though there might be multiple directions; So it's not too far of a stretch that similar, sometimes identical, methods are derived with no intention of copying.

Here's a example of what might happen among friends, focusing on alanjt, and alan - and then subsequently alan the t.willey.  This is also and example of how these functions, in my opinion, have contributed to many other optimized functions.
Or over here recently

In my opinion Kerry over-reacted.  It's not uncalled for Lee's notice of pre-existing posts, however I would have just posted the link.  He made no direct accusations as MP suggested (at first), rather opened the dialog for the research and due credit (if due) is given.  It was implied only; And how else would a discussion of credit be brought about?  More tact? Maybe.

Both gentlemen have exhibited integrity here and elsewhere.  As a nobody, but only in finding your contributions to many of my questions and others here, you all show friendship to others and myself.  I know that I overstep, but what little friendship I have, I ask  that your first see the perspective of the other, and when done, you most certainly will know that you must shake hands on this one.

Most Sincerely,
Ricky
« Last Edit: July 23, 2013, 02:36:24 PM by CADDOG »

LE3

  • Guest
Re: Search path...
« Reply #16 on: July 23, 2013, 04:07:47 PM »
I know that a specified file is existing and I want to find its location.
How do I get the path of the document (txt, doc... etc.)?
Thanks in advance.

I wrote this many moons ago, see if works:
Code: [Select]
(defun search_sub_folders  (pathfile ext)
  (mapcar '(lambda (sub)
     (cons sub
   (vl-directory-files
     (strcat pathfile sub)
     ext
     1)))
  (vl-directory-files
    (vl-filename-directory
      pathfile)
    nil
    -1)))

This one I just put it together:
Code: [Select]
(defun findFileOnFolders  (path name extension)
  (vl-some '(lambda (f)
      (findfile (strcat path (car f) "\\" name extension)))
   (search_sub_folders path (strcat "*" extension))))

usage:
Quote
(FINDFILEONFOLDERS "C:\\" "attleft" ".lsp")
"C:\\My_Stuff\\attleft.lsp"

HTH.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Search path...
« Reply #17 on: July 24, 2013, 07:53:58 AM »
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Search path...
« Reply #18 on: July 24, 2013, 09:20:32 AM »
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10623
Re: Search path...
« Reply #19 on: July 24, 2013, 11:00:41 AM »
Lee, you take your "online image" far too seriously. ...this is the internet, not real life. A series of 1s and 0s is isn't tangible. Go outside and give a perfect stranger a reason to laugh.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

andrew_nao

  • Guest
Re: Search path...
« Reply #20 on: July 24, 2013, 11:16:29 AM »
Just be warned that searching through lots of sub-folders could take some time. Even worse if searching on a network / remote folder....

i tried it on a network with 1000 directories, and it locked up my acad.
im sure there is a limit on how many directories can search without causing issues.

would anyone have a good guess as to how many?

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: Search path...
« Reply #21 on: July 24, 2013, 11:23:25 AM »
Lee, you take your "online image" far too seriously. ...this is the internet, not real life. A series of 1s and 0s is isn't tangible. Go outside and give a perfect stranger a reason to laugh.
I'm going to disagree.
TheSwamp.org  (serving the CAD community since 2003)

JohnK

  • Administrator
  • Seagull
  • Posts: 10623
Re: Search path...
« Reply #22 on: July 24, 2013, 11:25:51 AM »
I'm going to disagree.

With what?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Search path...
« Reply #23 on: July 24, 2013, 11:29:31 AM »
Lee, you take your "online image" far too seriously. ...this is the internet, not real life. A series of 1s and 0s is isn't tangible. Go outside and give a perfect stranger a reason to laugh.

Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

ronjonp

  • Needs a day job
  • Posts: 7527
Re: Search path...
« Reply #24 on: July 24, 2013, 11:31:21 AM »
All my better judgement says to stay out of this but anyhoo FWIW..

Let me preface this with I highly respect both of these members.

I don't think this is about Lee's online image. He's mad because he thinks that someone copied his code, changed a couple of lines and took credit (whether that's the case ... ) You can spin it 10 different ways but if in fact this is true it's wrong.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: Search path...
« Reply #25 on: July 24, 2013, 11:32:48 AM »
I'm going to disagree.

With what?
Sorry. His online image. In this day and age your online image is fast becoming who you are.
TheSwamp.org  (serving the CAD community since 2003)

JohnK

  • Administrator
  • Seagull
  • Posts: 10623
Re: Search path...
« Reply #26 on: July 24, 2013, 11:34:09 AM »


Sorry, I am still behind the company firewall; I cant see the image.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Search path...
« Reply #27 on: July 24, 2013, 11:35:00 AM »
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10623
Re: Search path...
« Reply #28 on: July 24, 2013, 11:41:28 AM »
Sorry. His online image. In this day and age your online image is fast becoming who you are.
Sadly, I kind of agree but if I can get a little sappy, cliche, stupid, etc. for a moment: I've come to realize there are far more important things in life. ...I was just trying to make the observation that it may be time for him to "disconnect" a bit. Just, tossing it out there.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10623
Re: Search path...
« Reply #29 on: July 24, 2013, 11:43:35 AM »
Apology accepted.

Glad that's settled. Wanna go get some coffee?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org