Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding a Volume Label
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00626993
Message ID:
00627011
Views:
28
Daniel,

I sure missed the "DV" parameter on the command. That is a very simple way to find the volume name.

Cetian had the suggestion to use fopen("txt1.txt") without the parameter and that works wonderful.

Thanks for the help!

Jeff


>Jeff,
>1. To get the volume label, you could try:
>
>ADIR(laDir,"D:\","DV")
>
>
>2. FOPEN(, 10) and FILETOSTR() should work with files on a CD.
>
>HTH
>>I have a program that uses low-level file functions to catalog files found on a CD-ROM drive. I have two questions.
>>
>>#1 - how do I find the volume label of a drive? I found this on the KB but am not able to turn it around to tell me what the current volume is.
>>
>> DECLARE INTEGER SetVolumeLabel IN Win32API STRING lcRootPath,;
>> STRING lcVolumeLabel
>>
>> liRetVal = 0
>> * Message box with OK/Cancel buttons
>> liRetVal = MESSAGEBOX("Insert scratch floppy disk in drive A:",;
>> 1)
>>
>> * Handle non-OK selection from message box
>> IF liRetVal # 1
>> RETURN
>> ENDIF
>>
>> lcVolumeLabel = "Test"
>> = SetVolumeLabel ("A:\", lcVolumeLabel)
>>
>>#2 - How can I FOPEN(cfilename,10) &Read_Only Un_buffered a file on a CD-ROM to read the files. I had to work around this problem by copying the file to the HD before fopen()'ing it.
>>
>>TIA
Jeff Pearce
Previous
Reply
Map
View

Click here to load this message in the networking platform