How to check file is exists in specified path in content server or not
i m using JDevloper 11.1.1.6.0
I want to upload file using RIDC functions,but before uploading it i have to check wheather it is already present on specified path in content server or not.
How i check it.
I tried to write a (simpler) version of my own code:
public static Results CheckInToFolder(File f) {
// create the binder
DataBinder checkinDoc = idcClient.createBinder();
// populate the binder with the parameters
checkinDoc.putLocal("IdcService", "CHECKIN_UNIVERSAL");
checkinDoc.putLocal("dDocTitle",
"Document checked in through RIDC at " +
new Date());
checkinDoc.putLocal("dDocType", "Document");
checkinDoc.putLocal("dDocAccount", "");
checkinDoc.putLocal("dSecurityGroup", "Public");
checkinDoc.putLocal("dCollectionID", "909964822906001607");
// add a file
// execute the request
try {
checkinDoc.addFile("primaryFile", f);
} catch (IOException e) {
myExecutable.logEvent("File" + f.getName() + " not found.");
return null;
ServiceResponse checkinResponse;
try {
checkinResponse = idcClient.sendRequest(userContext, checkinDoc);
myExecutable.logEvent("Check-in successful. Size:" + f.length() + " bytes");
catch (oracle.stellent.ridc.protocol.ServiceException e) {
myExecutable.logEvent("ServiceException");
e.printStackTrace();
return null;
catch (IdcClientException e) {
myExecutable.logEvent("Check-in failed.");
e.printStackTrace();
return null;
DataBinder checkinData;
try {
checkinData = checkinResponse.getResponseAsBinder();
Results res =
new Results(checkinData.getLocal("dID"), checkinData.getLocal("dDocName"));
myExecutable.logEvent("Successfully got response - dID is " +
res.getDID() + ", dDocName is " +
res.getDDocName());
return res;
catch (oracle.stellent.ridc.protocol.ServiceException e) {
myExecutable.logEvent("ServiceException2");
//e.printStackTrace();
return null;
catch (IdcClientException e) {
myExecutable.logEvent("Unable to get response.");
e.printStackTrace();
return null;
}What I'm getting is this:
Mon Aug 13 14:51:29 CEST 2012 0ms: Started
Mon Aug 13 14:51:29 CEST 2012 57ms: Connection to idc://192.168.44.129:4444 successfully established.
Mon Aug 13 14:51:29 CEST 2012 102ms: Check-in successful. Size:702 bytes
Mon Aug 13 14:51:29 CEST 2012 5ms: ServiceException2
Mon Aug 13 14:51:29 CEST 2012 0ms: Finished
This means:
a) it does, indeed, return the exception (oracle.stellent.ridc.protocol.ServiceException)
b) you could use this mechanism for your code
c) it is, indeed, primaryFile.name what's being checked
I will also take a look at the other service to perform the check prior to check-in service call.
Similar Messages
-
How to check any directory existance in TestStand?
How to check any directory existance in TestStand?
Is there TestStand function? Or other option without writing my own code in external program (e.g. LabVIEW or C)?
Thanks in advance
Solved!
Go to Solution.At Least according to the NI TestStand 2012 documentation, Engine.FindPath and Engine.FindFile work only within the NI TestStand SearchDirectories.
Maybe related: remote paths (\\server\path\to\file.ext) are considered "invalid" by Engine.FindPath. -
How to check File size of a Text file.
How to check File size of a Text file.
please explain me.
I am new in LabVIEW. and dont have much idea on this...;
Prashant Soni
LabVIEW Engineer
Solved!
Go to Solution.Hi Prashant,
and here's what you get when using the LV help...
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
How to check table have exists any views in oracle
hi,
how to check table have exists any views in oracleSELECT * FROM user_dependencies
WHERE type='VIEW'
AND referenced_type='TABLE'
AND referenced_name ='Your_Table_Name' You may use dba_dependencies to find views in different schema. -
How to check one table exist or not in SAP
Hi, Gurus:
How to check one table exist or not in the SAP.
Thanks,Hi,
Query the table DD02L..
Select single * from DD02L where tabname = 'Your table name'
AND TABCLASS = 'TRANSP'. " For transparent tables.
Thanks
Naren -
How to check file exist in applet?
I would like to check the existance of a file from an applet. How can I achieve that? I'd tried many attempts but still fail to get an answer. Please kindly help.
Below are my file structures:-
folder/applet/myApplet.java
folder/appletView.jsp
folder/image/image1.gif
I would like to check if image1.gif exist. if yes, then load and display it in applet, but I having problem on the how to specify the file location.Assuming image1 is in the same folder as the applet:
InputStream is;
byte[] buf = new byte[1024];
URLConnection urlc = null;
try {
URL a = new URL(this.getCodeBase(),"image1.gif");
urlc = a.openConnection();
is = urlc.getInputStream();
int len = 0;
ByteArrayOutputStream bos = new ByteArrayOutputStream();
while ((len = is.read(buf)) > 0) {
bos.write(buf, 0, len);
// close the inputstream
is.close();
} catch (IOException e) {
try {
// image1.gif probably does not exist
// now failing to read the inputstream does not mean the server did not send
// any data, here is how you can read that data, this is needed for the same
// reason mentioned above.
((HttpURLConnection) urlc).getResponseCode();
InputStream es = ((HttpURLConnection) urlc).getErrorStream();
int ret = 0;
// read the response body
while ((ret = es.read(buf)) > 0) {
// close the errorstream
es.close();
} catch (IOException ex) {
// deal with the exception
} -
How to check file name in local c drive and run exe file
Hi All,
I'm newbie user in action script. How can i check sepecific
file name in local c:\ drive and if file doesn't exist in local
drive download from server and run and if exist go to frame ..... .
Please help to me.
Thanks,Dear Marghoob Suleman
Thank you very much for your kind help.
Thanks in advance -
How to check file name in APP server
Hi,
Iam writing some files to APP server .Iam unable to check those files by using AL11. How to check those files in APP server?Hi,
You can use this FM EPS_GET_DIRECTORY_LISTING.
Also please try this FM /SAPDMC/LSM_F4_SERVER_FILE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_apath.
* Open the Browse Dialog Box on the Application Server
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
IMPORTING
serverfile = p_apath
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2.
IF sy-subrc <> 0.
* No need to check for sy-subrc
ENDIF.
Regards,
Ferry Lianto -
How to fix 'file already exists, code 6' cs5.03 win7 64bit bluray please
hello,
at the last part of a 31gb bluray h264 iso image burn
encore stops responding for 20 minutes (disappears from task manager
and performance monitor entirely) and then says 'code 6 file already exists'
the same error has occurred twice at the very end of the build
i cleared the preferences each time
any help is appreciated...
jeffreyhello,
after a lot of reading and
some digging, figured out
how my system does things:
when you tell encore to write a bdmv folder
you come out with 2 folders: bdmv and a temp folder
using image burn you load up the first bdmv folder which contains
the streams, etc.
then tell image burn to load up the certificate folder
which is hiding in the temp/db/certificate directory
very clever...
disc burns successfully and menu navigation in tact on pc
and on hdtv through set top bluray
thanks for all the help...
have a great day...
jeffrey -
How to check via wlst that application was deployed on specific server?
There is several managed servers(not in claster) on environment.
My application is deployed on a few of them.
1. How to check if application was already deployed on some specific managed server?
2. Is it possible to redeploy application only on one managed server?
3. How to redeploy application on all managed servers?
Edited by: vbez on Sep 13, 2010 6:26 AMHow to check if application was already deployed on some specific managed server?
applicationRuntime = cmo.getAppRuntimeStateRuntime();
state = applicationRuntime.getCurrentState("deploymentname", "deploymenttarget");Is it possible to redeploy application only on one managed server?
If you redeploy an application it is deployed to all the targets it has been assigned to.
How to redeploy application on all managed servers?
See above. If your application has been targetted to the managed servers
it gets redeployed to these targetted servers. -
Firefox did an auto update and since then I cannot open/run Norton Internet Security. It won't even let me update it or re-install it. I get an error message stating Windows cannot find the specified path. You may not have appropriate permissions to access this.
Hi
Some required information are needed for us to help you.
Hi NabeelOmer,
We wonder if you have taken any action such as system restore after this issue occurred.
You might also try this command to restore your access control list.
Run this command to navigate to the drive letter, example is D
D:
To reset all permissions, run this command
icacls * /reset /t /c /q
Visual Studio is a very invasive program and which provides the ability to enumerate projects and solutions for system, user should never try uninstalling it manually without any guidance.
Visual Studio made changes for your whole system, if the file has been moved or deleted this error would occur.
Since you mentioned that you get this error almost everywhere even in control panel. We suggest you repair/reinstall your Visual Studio first and check if it could be fixed.
How to: Repair Visual Studio
https://msdn.microsoft.com/en-us/library/aa983433%28v=vs.90%29.aspx?f=255&MSPPError=-2147217396
Regards
D. Wu -
Checkout and editing of original files to a DIR stored in SAP content server
Hi,
is it possible with SAP Web Documents to checkout and edit original files from a document info record that are stored in a SAP Content Server and save the changes back to the SAP Content Server?
Kind regards
Florian WiedemannHi,
unfortunately it's not that easy. Mobile Documents provides with NW ABAP 7.40 SP10 an API which, if you implement it, allows you to expose data from basically any ABAP system. Currently the API only provides read support, but we are already working on enabling write and versioning support also.
If you are interested there is an Expert Session next week on Wednesday the 17th which explains how to get your Data to SAP Mobile Documents.
Here are the details: SAP Mobile Documents - Webinars
Best regards
Alex -
How to restrict read access to certain document in stellent content server
Hi,
We are using stellent content server to store project documents. We would like to restrict access to certain confidential documents.
Users with Read / Write permission should not be able to access but admins with RWDA permission should be able to access these confidential documents.
Appreciate your inputs on this.
Thanks,
NayanaWithout seeing your setup and environment its a bit hard..
But...
Make sure that user has read only access to public security group.
You could setup an addition role with readOnly access and apply it those users.
Or restrict there account to have Read only access.
Remember if the user has Admin access on the Account but only readonly access on the security group then they will only have read only access on the files and visa versa.. :)
J.
Message was edited by:
JRS -
Hi,
I would like to calcualte storage requied for Video files on the Telepresence Content Server, MPEG Format. What is the per minute storage required for a video file with and without compression? What kind of Video compression rates are supported on TelePresence Content Server and MXE 3500.
Thanks
SueHi,
Following thread might be helpful to you...
http://scn.sap.com/thread/1637092
http://scn.sap.com/thread/1284704
BR,
Anirban -
How to check files in the directory using JSP?.
Hi,
How can i check the file is directory or file and readable or writable and file size and type of file(Ex. jpg, txt, doc., etc). i want to list the specific type of file in the particular directroy.. please help me..
Regards
CHinnaWith the File class, using the methods isFile(), isDirectory(), canRead(), canWrite(), length() and getName()
With File.listFiles() you can get a directory listing. If you want to limit the amount of files returned, you can pass your own FileFilter to it.
http://java.sun.com/javase/6/docs/api/java/io/File.html
Maybe you are looking for
-
F4IF_INT_TABLE_VALUE_REQUEST not returning value with 2 decimals point
hi all, i use function F4IF_INT_TABLE_VALUE_REQUEST to do search help, the master data in table ZINVEST has field ZNO, with field type CURR , 2 decimals point. the return table shows 2 decimals point but in display screen it only shows 1 decimal poin
-
Steps to upgrade from sql 2008 r2 se (nonclustered) to sql 2012 se (clustered)
hello, I am currently running a non clustered instance of a sqlserver 2008 R2 SE and need to upgrade to a clustered instance of SQLServer 2012 SE. The underlying OS is Windows 2008 R2 SE. I already bought the second server with the same os online but
-
I just purchased MAC OSX Snow Leopard Software update to Version 10.6.3. At present my MACBOOKPRO is Mac OS X Version 10.5.8. Since this is the first time I have purchased new software upgrade for my MACBOOKPRO I would like to know before installat
-
Help with internal microphone.
H there, could sombody please explain to me in layman's terms how to fix my microphone. There is absolutely no sound comming through it, and I've updated drivers etc, I feel like I have tried evertyhing. I have windows 8 system. Thanks, Regards, N
-
Calling one application into another
how can i call one application file into another so that session should not expire in any way Has anyone done such like that