On Oct 7, 2006, at 7:20 AM, Lennox Jacob wrote:
Hi Terry,
f = volume ("My Files Hard Drive").child(My docs).child(My New docs)
1. You forgot the Quotes in the child folder names.
Actually in the project I did not forget the quotes, in the email I
did.
The problem here is that:
f = volume ("My Files Hard Drive").child("My docs").child("My New
docs") is not accepted by the compiler, it needs something like this
f = volume (1).child("My docs").child("My New docs")
and that is accepted.
Touché. You can see I haven't worked with internal or external
volumes enough.
Since you don't necessarily know which volume number it is, you would
probably need something like this:
Dim f As FolderItem
Dim i,n as Integer
n= VolumeCount-1
For i=0 to n
If Volume(i).name= "My Files Hard Drive" Then
f=Volume(i)
Exit // Volume found so exit loop
End If
Next
// Check if volume found.
If f=Nil or f.Exists=False Then
MsgBox "Volume Not Found"
// Do abort routine as volume not mounted.
// Return?
End If
// Find and check the first Child FolderItem
f=volume(i).Child("My docs")
If f<>Nil and f.Exists Then
// Find and check the next Child FolderItem
f=f.Child("My New docs")
If f<>Nil and f.Exists Then
// You're good to go
Else
MsgBox """My New docs folder"" not found"
// Do abort routine as folder not found.
// Return?
End If
Else
MsgBox """My docs folder"" not found"
// Do abort routine as folder not found.
// Return?
End If
// Go on as f contains path to "My New docs"
From there you save your file using that folderitem.
Terry
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>