I found the problem. It's my mistake! The java program tried to look for a file: "BarcodeSeqence.txt"(incorrect spell). The actual file name is "BarcodeSequence.txt". That's how I got the error message.
I do want to apologize for any confusion that may cause.
Thank you all for the help!
I tried to use \\ instead of / and got the same error. Thanks, Dian.
I am a C++ programmer and new to java. Thanks to Tim for teaching. It's great to know.
The logic to delete file is packaged in ResetSequenceNumber.jar file. The application to launch this JAR file is a third party product. It is required to specify a command line in the application's configuration file.
The initial testing was on my XP workstation using cmd.exe.
It was then...
I have a simple jave program as below:
package us.ma.main;
import java.io.File;
public class DeleteFile {
public static void main(String[] args) {
String fileName = "c:/Barcode/BarcodeSeqence.txt";
File file = new File( fileName );
if( file.exists()){
file.delete()...
I added the following 2 lines code before calling
objNetwork.MapNetworkDrive driveLetter, fullPath, bPersistent, userName, password
On Error Resume Next
objNetwork.RemoveNetworkDrive driveLetter
It works!
Thank you very much!
LZ
I have the following code in a Visaul Basic 6.0 program for mapping to a network drive:
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive driveLetter,fullPath, bPersistent, userName, password
driveLetter will be searched at run time, all other parameter values will...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.