Why are you doing it by IP, do it by PC name and share name.
I would personally map a drive to your home PC from your car PC, it will make it more stable.
Hi,
I have writen my own front-end and for a final touch I thought I would have an option to wirelessly update the MP3 shared folder on my PC when I am in the driveway.
Right, what I have done is set my home PC to a static IP address of '192.168.0.136' and a shared folder called 'mp3'
Here is a small bit of code demonstating what I want to do...
strHubComputerIP = "192.168.0.136"
strHubComputerMp3Folder = "mp3"
strRemoteDirectory = New DirectoryInfo("\\" & strHubComputerIP & "\" & strHubComputerMp3Folder & "\")
If strRemoteDirectory.Exists Then............
this works fine, but if I change the IP address to "192.168.0.135", the computer hangs for 2 minutes.
For example, if I pull into my drive and want to update, but my home PC is off, I don't want the computer in the car to hang. I want it to tell me that the IP address isn't found.
Hope someone can help, I've been working on my front-end for a year now as I've been saving up for the hardware. This is the last bit I need to sort out, then I can build the machine![]()
Why are you doing it by IP, do it by PC name and share name.
I would personally map a drive to your home PC from your car PC, it will make it more stable.
Thanks for the quick reply.
So simply using this code:
strHubComputerName = "main-computer"
strHubComputerMp3Folder = "mp3"
strRemoteDirectory = New DirectoryInfo("\\" & strHubComputerName & "\" & strHubComputerMp3Folder & "\")
If strRemoteDirectory.Exists Then
' Some code......
ELSE
' Some code telling the user that the remote shared folder can't be seen.....
END IF
should do the trick then?
So if I make sure that the workgroup setup on the carPC is the same as the one on my home PC and run this code on the carPC when the wireless is in range and the home PC is on, the code should work?
Thanks again
Just replace the IP address with the PC name.
ie
Assuming that HomePC is the name of the PC.Code:strHubComputerName = "HomePC" strHubComputerMp3Folder = "mp3" strRemoteDirectory = New DirectoryInfo("\\" & strHubComputerName & "\" & strHubComputerMp3Folder & "\") If strRemoteDirectory.Exists Then............
However if you mapped a drive then all you would need is the drive letter you mapped it to.
Thanks very much,
I'll try this.
Bookmarks