Results 1 to 4 of 4

Thread: File Count & Startup switches

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    5

    Question

    Hi,

    Does anyone know how I can get a count of files from a specfic directory ?

    Also, if I want to supply a startup switch with the .EXE file, how can nI pick this up in my code ?

    Many thanks,

    Nick.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    For counting files:
    Code:
    a=dir(path)
    do while len(a)
     a=dir
     count=count+1
    loop
    What do you mean with startup switch?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    5

    Wink

    Thanks for the quick reply!

    when I call the .exe file I want to supply a server name with it. The server name will change a lot. So for example:

    code.exe servername

    I want to be able to find out in my code what the name of the server is.

    I hope this make it a bit clearer ?


  4. #4
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    You use the "command" function. This will return to you any parameters that were typed after the exe.

    Code:
    Dim stServer as String.
    
    'In Form Load
    
    stServer = Command
    Funny, i had to do the same thing a couple of months ago.
    Iain, thats with an i by the way!

Posting Permissions

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



Click Here to Expand Forum to Full Width