Welcome, Guest. Please login or register.

Author Topic: Blitz Basic: Retrieving volume info?  (Read 2104 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Blitz Basic: Retrieving volume info?
« on: August 29, 2006, 07:27:29 AM »
Hi all

I'm trying to find a way of retrieving a list of currently mounted volumes, and also finding out the amount of data in bytes on a volume. Can anyone give me a hint to the correct Blitz2 functions?

Thanks

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline adolescent

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 3056
    • Show only replies by adolescent
Re: Blitz Basic: Retrieving volume info?
« Reply #1 on: August 29, 2006, 08:31:09 AM »
Check out DosElmoreLib22.lha on Aminet.
Time to move on.  Bye Amiga.org.  :(
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Blitz Basic: Retrieving volume info?
« Reply #2 on: August 29, 2006, 09:46:25 AM »
GetAssigns(2) and DiskUsed look like exactly what I need. Thanks! I'm not too familiar with Blitz (yet) so can I just run my code by you first? Normally I would just try it but I don't want to experiment with routines which do things to disks :-)


If GetAssigns(2)
-Repeat
--a$=Assign$
--If a$
---Analyze a$
---used$=DiskUsed
---NPrint a$ used$
--EndIf
-Until a$=""
EndIf


--
moto

--EDIT
Added some white "-"s because HTML rendered out the indenting spaces :roll:
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Blitz Basic: Retrieving volume info?
« Reply #3 on: August 29, 2006, 07:53:58 PM »
This may be a stupid question, but how do I include the .obj file in my Blitz application so I can call its functions?

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Blitz Basic: Retrieving volume info?
« Reply #4 on: August 29, 2006, 08:29:58 PM »
Ok I found BlitzLibMan on Aminet which recompiled the deflibs including the new .obj I downloaded. The programme now runs, but it returns incorrect values for DiskUsed. Two of the three volumes reported negative values and the other reported a value which was far to small. Any thoughts?

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline adolescent

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 3056
    • Show only replies by adolescent
Re: Blitz Basic: Retrieving volume info?
« Reply #5 on: August 30, 2006, 08:48:49 PM »
Are they >4GB?  Maybe it has a problem with large volumes?
Time to move on.  Bye Amiga.org.  :(
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Blitz Basic: Retrieving volume info?
« Reply #6 on: August 30, 2006, 08:50:22 PM »
Yes the one which returns incorrect values is >4GB. Piru has suggested in another thread that I call dos.library's info() function directly. No idea how tho :roll:

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10