Comparing File Name to String

Dug

New member
Joined
Mar 31, 2009
Messages
3
Hi there,

Im just about banging my head on the table with this one, so I hope someone can help.

Im making a Facebook application - I have a windows application that uploads a text file to my web server, and I want to compare the name of the text file to the first name and last name of the Facebook user, and if they are the same, then open the text file.

When I was playing around with it, I printed the path and file name, but it looked like there was a space before the file name and before the file extension. My original idea behind it was:

Code:
Dim Name As String = _fbService.fql.query("SELECT first_name, last_name FROM user WHERE uid = " & Session("Facebook_userId") & "")
		
		Dim File As String
	    Dim s as String
		For Each s in Directory.GetFiles(Server.MapPath("/NowPlaying/"), "*.txt")
			File = GetFileNameWithoutExtension(s)
			If File = Name Then
				Response.Write(File)
			End If
		Next

It seems like it should be very simple, but nothing works!! Hope someone will be able to help.

Thanks

Dug
 
Back
Top