Results 1 to 8 of 8

Thread: undefind folder path

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    86

    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

  2. #2
    Hyperactive Member Blacknight's Avatar
    Join Date
    Nov 2002
    Posts
    381
    does you folder have any constant letters which it can be identified by? how do you generate your folder's name?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    86
    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.

  4. #4
    Hyperactive Member Blacknight's Avatar
    Join Date
    Nov 2002
    Posts
    381
    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)

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    86
    and how do i do this

  6. #6
    Hyperactive Member Blacknight's Avatar
    Join Date
    Nov 2002
    Posts
    381
    VB Code:
    1. Option Explicit
    2. Private Declare Function PathFileExists Lib "shlwapi.dll" Alias "PathFileExistsA" (ByVal pszPath As String) As Long
    3.  
    4. Private Sub Dir1_Change()
    5. Form1.Caption = Dir1.List(0)
    6. End Sub
    7.  
    8. Private Sub Form_Load()
    9. Dim fexists, x As Boolean
    10. Dim filename As String
    11. Dim i As Long
    12. fexists = False
    13.  
    14. 'write the path you want to search (it will search all folders within for file)
    15. Dir1.Path = "d:\bin\"
    16.  
    17. 'set the file name you are searching for
    18. filename = "w.txt"
    19.  
    20. For i = 0 To Dir1.ListCount - 1
    21. x = PathFileExists(Dir1.List(i) + "\" + filename)
    22. If x = True Then fexists = True
    23. Next
    24.  
    25. 'fexists is true if file was found, else it is false
    26. Form1.Caption = fexists
    27. End Sub

    this code requires you to add a dir list box which is part of the
    default controls

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Sep 2004
    Posts
    86
    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.

  8. #8
    Hyperactive Member Blacknight's Avatar
    Join Date
    Nov 2002
    Posts
    381
    VB Code:
    1. dim x,y as string
    2. 'if x is your text and its 27 first letters should be emmitted
    3. 'use the following
    4. 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
  •  



Click Here to Expand Forum to Full Width