Jump to content




finding a different program


  • You cannot reply to this topic
6 replies to this topic

#1 songsteel

  • New Members
  • 2 posts

Posted 18 May 2014 - 07:56 AM

sorry if this is in the wrong section, but how do i search for a separate program from another, similar to the shell.getRunningProgram() but for a non running program, i'm trying to access the name of a file to use as a variable for my startup program.
thanks
-songsteel

#2 CometWolf

  • Members
  • 1,283 posts

Posted 18 May 2014 - 11:02 AM

use fs.list(path) to get a table of the files in a given directory. You can then iterate this table to look for your file. Alternatively, if you're on 1.6 you can just use fs.find
http://computercraft.info/wiki/Fs.find

#3 songsteel

  • New Members
  • 2 posts

Posted 18 May 2014 - 11:16 PM

im meaning to find a specific program that will vary from computer to computer.

#4 flaghacker

  • Members
  • 655 posts

Posted 19 May 2014 - 05:22 AM

Can you tell us the rules for witch file needs to be found? Because "i want to find a file" is a little vague...

#5 viluon

  • Members
  • 183 posts
  • LocationCzech Republic

Posted 19 May 2014 - 06:09 AM

Like FlagHacker said, what are you looking for exactly? Do you want to find the file by name? Size? Location? Please be specific

#6 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 19 May 2014 - 12:38 PM

You could look through this thread:
http://www.computerc...age__hl__verify
which will most likely make no sense whatsoever. But, they did come up with a way to verify that a file is the same as another file hosted on the web (in github specifically). There is probably an easier way, but it would be less accurate.

#7 apemanzilla

  • Members
  • 1,421 posts

Posted 19 May 2014 - 02:16 PM

The only real way you could find different files with the same content across different computers would be to search based on the content of the program, although that may not always be consistent.





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users