How do I delete a file on my shared LAN network with vbs???

1. The vbs file is in the same directory as the file i need deleted
2. How do I do this without having to declare long locations???

Anybody?
help would be appreciated thanks

To delete a file on a shared LAN network using VBScript, you can follow these steps:

Step 1: Create a VBScript file (e.g., delete_file.vbs) in the same directory as the file you want to delete. Open the script file using a text editor.

Step 2: In the script file, use the FileSystemObject to delete the file. Here's an example of how to do this:

```vbscript
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFilePath = objFSO.GetAbsolutePathName("your_file_name.txt")
objFSO.DeleteFile strFilePath
```
Replace "your_file_name.txt" with the actual name of the file you want to delete.

Step 3: Save the script file.

To execute the VBScript file:

Option 1: Double-click the VBScript file to run it.

Option 2: Open the command prompt, navigate to the directory where the VBScript file is located, and run the following command:
```bash
cscript delete_file.vbs
```

This will execute the VBScript and delete the specified file.

Regarding your second question, deleting a file without specifying a full file path is not possible, as the file system needs to know the exact location of the file. However, you can make use of relative paths instead of absolute paths to avoid typing long file locations.

If the file you want to delete is in the same directory as the VBScript file, you can simply provide the file name without any path, and the script will assume it is in the same location.

If the file is in a different directory relative to the VBScript file, you can use relative path operators like "..\" to navigate up a directory level, or ".\" to refer to the current directory. For example, if the file is in a subdirectory called "files", you can use:

```vbscript
strFilePath = objFSO.GetAbsolutePathName(".\files\your_file_name.txt")
```

By using relative paths, you can avoid the need to type long file locations.