Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting files on remote server

Status
Not open for further replies.

SpokaneTJ

Technical User
Dec 9, 2003
25
US
Good Day,

I have a web farm and am trying to create an application that will copy, del and move files from one location to all the web servers. I am able to do everything but delete files.

This is the statement I use:

Shell("del \\wp1\c$\apps\bppr\2006\catalog\*.* /F /S /Q", AppWinStyle.NormalNoFocus)

When I run it from the button I have it connected to it gives me this error.

File not found. Is there a way to get them to delete without having to call a batch file to do it?

Yes the files are actually there.

Thanks.

SpokaneTJ
 
SpokaneTJ,

If you are using .NET 2.0 then try using the following:

My.Computer.FileSystem.DeleteDirectory(...)
My.Computer.FileSystem.DeleteFile(...)

Hope it helps.

 
Computerjin,

Thank you very much for the suggestion, I tried it, but it doesn't like deleting anyting on a remote server. Continues to give me the error message "Verify files exist in the specified directory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top