• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 126
  • Last Modified:

Checking what files are on a remote computer

I would like to check a server for a certain file because
I would eventually like to save some files to that server
without overwriting any of the existing ones.  Do you
know how I could do that?
0
impega
Asked:
impega
  • 2
  • 2
1 Solution
 
mark2150Commented:
As long as you have a drive pointing to the server you can look for the file just like it was local. Any other method will essentially start with establishing a drive connection to the server.
0
 
impegaAuthor Commented:
How do I set up that drive and search for the file in VB?
0
 
impegaAuthor Commented:
Thanks for the reply but I need a little bit more detail.  How do I map the drive and
search for a file in VB?
0
 
mark2150Commented:
You generally don't map the drive in VB (although you could with a SHELL statement...) The connection to the drive should be done at the OS level prior to your program running. This is a machine level configuration item and you generally don't want to be dynamically assigning drives. You can do it, but it is considered poor practice as it can cause problems elsewhere in the system. Your users will generally have their drive letters assigned at login time or they can manually create a mapping in MY COMPUTER. Either way the drive letter should be a *given* to your program and not something that you have to create dynamically. If the drive letters are established in the system master login script they will be universally available. System administrators usually provide an environment var with drive letters in them or you can create your own. Then your program can respond to different systems as the drive letter moves.

M
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now