TheVeee
asked on
VB 6 Example of deleting a file on a remote computer
Last job wrote a program to logon to another server, delete a file in a certain directory. Unfortunely didnt bring code to new job. Does anyone have a example of connecting to a server using a certain userid and password and then deleting a file from a directory?
ASKER
I can write it with either language.. just wanted the best solution from both worlds to make my choice...
You're example takes it a a granted your logged in and mapped to the drive.. I wont be. We support 40 servers so I just dont want to map all 40 servers to my local machine. Im looking for something like...
1. From my machine run the application
2. For each machine do the following
a. Log onto remote server using a generic userid and password
b. Then do you code from above.
c. Then Log off remote server
You're example takes it a a granted your logged in and mapped to the drive.. I wont be. We support 40 servers so I just dont want to map all 40 servers to my local machine. Im looking for something like...
1. From my machine run the application
2. For each machine do the following
a. Log onto remote server using a generic userid and password
b. Then do you code from above.
c. Then Log off remote server
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you're looking for a Java example, you can use the java.io.File class:
File f = new File ( "Shared file path" ) ;
if ( f.exists () )
f.delete () ;