|
-
Oct 3rd, 2004, 02:44 AM
#1
Thread Starter
Lively Member
undefind folder path
i have created a new problem
in a thread on this forum i asked to get the name from the folder after documents and setting
i know how to do this so i can go on
the next problem is here
C:\Documents and Settings\Davy.DAVY-QUYO\Application Data\Macromedia\Flash Player\#SharedObjects
on this location of my pc there is a map
only 1 map
the problem is
the name of the map is on evry pc diffrent
and i want to find out what's the name of this map
so i can reach the file's behind it bewause i need them to comunnicate with my website
so my question is
how can i find the exact name of a folder on this location
hope i can do this
-
Oct 3rd, 2004, 09:56 AM
#2
Hyperactive Member
does you folder have any constant letters which it can be identified by? how do you generate your folder's name?
-
Oct 3rd, 2004, 10:49 AM
#3
Thread Starter
Lively Member
with me the folder name = VZ7E3UL5
it had been generated by macromedia flash who stroes their shared object at this location
it's the same as cookie's
but i need to past these map to get these files
with someone else this folder has a difrent name
Last edited by davyquyo; Oct 3rd, 2004 at 10:54 AM.
-
Oct 3rd, 2004, 11:20 AM
#4
Hyperactive Member
loop through all folders and check if the files in them are the ones you need (if the files in the folder have a name which you know and doesn't change)
-
Oct 3rd, 2004, 11:21 AM
#5
Thread Starter
Lively Member
-
Oct 3rd, 2004, 12:01 PM
#6
Hyperactive Member
VB Code:
Option Explicit
Private Declare Function PathFileExists Lib "shlwapi.dll" Alias "PathFileExistsA" (ByVal pszPath As String) As Long
Private Sub Dir1_Change()
Form1.Caption = Dir1.List(0)
End Sub
Private Sub Form_Load()
Dim fexists, x As Boolean
Dim filename As String
Dim i As Long
fexists = False
'write the path you want to search (it will search all folders within for file)
Dir1.Path = "d:\bin\"
'set the file name you are searching for
filename = "w.txt"
For i = 0 To Dir1.ListCount - 1
x = PathFileExists(Dir1.List(i) + "\" + filename)
If x = True Then fexists = True
Next
'fexists is true if file was found, else it is false
Form1.Caption = fexists
End Sub
this code requires you to add a dir list box which is part of the
default controls
-
Oct 3rd, 2004, 02:38 PM
#7
Thread Starter
Lively Member
ok it wil do with that
only one problem
i can now read the shared object
the next thing i want to ask is
when visual basic reads the file
the first
27 letters must be ignored while reading how can i do that
Last edited by davyquyo; Oct 3rd, 2004 at 03:04 PM.
-
Oct 3rd, 2004, 03:46 PM
#8
Hyperactive Member
VB Code:
dim x,y as string
'if x is your text and its 27 first letters should be emmitted
'use the following
y=mid(x,28,len(x)-27)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|