on 01-24-2008 2:41 PM
Hi,
In my appilcation I need to check if file exist.
In the appication properties i set the
sap.authentication to true.
Altough the file exist when i use the file.exist method i receive false.
Here the code:
String fileName =
("//cellcom_nt/dfs02/Groups3/MIS/SD/Packags_DVLA/old/PKG_COMB_DESC.DNE");
File path = new File(fileName);
String file = path.getName();
String parentPath = path.getParent();
if (path.exists()) {
wdComponentAPI.getMessageManager().reportSuccess(
"===File Exist === " + parentPath + "
" + file);
} else {
wdComponentAPI.getMessageManager().reportSuccess(
"=== File Not Exist === " + parentPath + "
" + file);
}
T.I.A
Yossi
Hi,
Authorization must be given to the user sapservice<sid>
for the required directory path.
Yossi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Roelof,
The path is correct.
When i use the windows start->run->file path i see the file.
I use the character "/" instead of "\". the file object know to convert it to "\".
Regards
Yossi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The code seems right.
Are you sure there's not typo? e.g. Packags_DVLA instead of Packages_DVLA
Good luck, Roelof
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.