Creating a file in different directory.....
i have program that uses File class from Java IO package for creating a text file. I have written this program in c:\test\proj and i am running the program in that location. So obviously text file is created in the same directory...
But the information from this text file is required for my servlet that runs on web server tomcat 4.1..so i have to manually copy this file and place this on the required directory...i have written program to create the same file on in C:\Program Files\Apache Group\Tomcat 4.1\webapps\examples this directory but this is not happening..I reckon this is because of the spaces in the directory names....
my problem is i am running program on c:\text\proj directory and i want text file to be created in C:\Program Files\Apache Group\Tomcat 4.1\webapps\examples...
the statement i am using to create a file is...
File f = new File("C:/Program Files/Apache Group/Tomcat 4.1/webapps/examples/ping.txt");
do i have to modify the statment????
please provide me with a solution...
thanx
You must be getting an IOException of some description when you open the output stream to the File.
Or else you're looking for your file in the wrong place ...
Similar Messages
-
Installer does not create directories/files in APPDATA directory
I have an installer that installs the application into the Program Files directory, and additionally, is supposed to create application files and a directory structure in the Public App Data (%APPDATA%) directory of the Windows installation. In the LV Build Specification, I have created the appropriate destinations, moved the project specific files to those destinations in the Source File section, and tried combinations of the source file properties. When I run the installer, the application installs into Program Files correctly, however, nothing is created in %APPDATA%. I have even marked these files as vital to the installation, in order to stop, if there's a problem. No problem was indicated during the installation.
Thanks for the help.Hi Jlgeris,
I build a little istaller and told the installer to put something in the appdata directory as you can see in the attached files. After installing it, I found the file in the right directory.
Did you do this in the same way?
regards
Tobias
Attachments:
Destinations.png 89 KB
Source_Files.png 93 KB
Appdata.png 95 KB -
How to create pdf files in UNIX directory from oracle reports
I would like to know how to create pdf files in UNIX directory from oracle reports.
Thanks,Please make your question more clear . Also mention the reports version.
1) If you are runnning reports in Unix, you can give
.... destype=file desformat=pdf desname=<filename>
in command line
Please refer docs below.
2) If by your question you mean
"My reports server is running in Windows but I want to ftp my files to Unix after creating it"
then the answer is that you can use pluggable destination "ftp"
.... destype=ftp desformat=pdf desname=<ftp url>
Pluggable destinations download
http://otn.oracle.com/products/reports/pluginxchange/index.html
Thanks
Ratheesh
[ All Docs ]
http://otn.oracle.com/documentation/reports.html
[ Publishing reports to web - 10G ]
http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
[ Building reports - 10G ]
http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
[ Forms Reports Integration whitepaper 9i ]
http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf -
Unable to Create a file in a directory through a Job
Hi,
We have a anonymous block which uses utl_file package
It created a file in an oracle directory.
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
DECLARE
v_definition_clob CLOB;
v_codes VARCHAR2 (32767);
v_engine_name application.NAME%TYPE := 'CLAIMS';
v_knwldgebase_name knowledge_base.NAME%TYPE := 'CLAIMS';
v_rule_name VARCHAR2 (32767);
v_msg VARCHAR2 (200);
fid UTL_FILE.file_type;
BEGIN
fid :=
UTL_FILE.fopen ('MID5010_DOC1TEMP', 'Diagnosis_Report.csv', 'W', 32767);
UTL_FILE.put_line (fid, 'Rule Name ,Associated Codes');
FOR rule_name IN (SELECT DISTINCT rh.NAME, rh.rule_header_id
FROM rule_header rh,
knowledge_base kb,
application app
WHERE
app.application_id = kb.application_id
AND rh.knowledge_id = kb.knowledge_base_id
AND app.NAME = 'CLAIMS'
AND kb.NAME = 'CLAIMS')
LOOP
v_codes := NULL;
BEGIN
SELECT definition
INTO v_definition_clob
FROM rule_header
WHERE rule_header_id = rule_name.rule_header_id;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
v_definition_clob := EMPTY_CLOB ();
WHEN TOO_MANY_ROWS
THEN
v_definition_clob := EMPTY_CLOB ();
END;
DBMS_OUTPUT.ENABLE (50000000);
FOR code_indx IN (SELECT d.diagnosis_code AS code
FROM midev.diagnosis d
WHERE d.diag_ctgry_lkpcd = 'D' AND ROWNUM < 10
ORDER BY 1 ASC)
LOOP
IF REGEXP_INSTR (v_definition_clob, code_indx.code) > 0
THEN
v_codes := v_codes || code_indx.code || '|';
END IF;
END LOOP;
IF LENGTH (v_codes) > 0
THEN
v_codes := CHR (39) || v_codes;
END IF;
UTL_FILE.put_line (fid,
REPLACE (rule_name.NAME, ',', ' ')
|| ','
|| SUBSTR (v_codes, 1, LENGTH (v_codes) - 1)
END LOOP;
UTL_FILE.fclose (fid);
EXCEPTION
WHEN OTHERS
THEN
UTL_FILE.fclose (fid);
v_msg := DBMS_UTILITY.format_error_backtrace ();
DBMS_OUTPUT.put_line (v_msg || SQLCODE || ',' || SQLERRM);
END;
Now when i converted anonymous block into a procedure "DIAGNOSIS_REPORT_PROCEDURE" and calling it thorough a job its not creating the file. we are using the below code to create a job
BEGIN
--DBMS_SCHEDULER.drop_job (job_name => 'DIAGNOSIS_TESTING_REPORT_3');
DBMS_SCHEDULER.create_job
(job_name => 'DIAGNOSIS_TESTING_REPORT_3',
job_type => 'STORED_PROCEDURE',
job_action => 'DIAGNOSIS_REPORT_PROCEDURE',
start_date => to_Date('30-Mar-2012 16:44:03','dd-mon-yyyy hh24:mi:ss'),
--repeat_interval => 'freq=yearly',
enabled => TRUE,
comments => 'DIAGNOSIS_TESTING_REPORT_3'
END;Any help would be appreciated..
Thanks
P Prakash.I got the answer.
If we need to run a procedure through job then we must execute privilege . -
How to create a file in current directory
hi,
I want to create a file in a current directory, But when i written following
code then it cannot create file, How i will create file in current directory?
Is there anyone who can help me?what will be the solution of this problem?
Please give me solution
String dir=application.getRealPath("/");
int count;
String filename="sample.txt";
out.println(dir+filename);
FileOutputStream fout=new FileOutputStream(filename);
PrintStream p;
p=new PrintStream(fout);
p.print("1");
p.close();with regards
Binahi,
my problem is that my path is ok...but when i open file in this directory then
it cannot open a file, is there anyone who can do it? When a user save data in server from remote
area then what will be path of my code? how i will solve it? please give me
solution.
with regards
bina -
Multiple files in different directory using single FILE adaptor
Hi Guys,
How can we handle multiple files having different format(PDF,TXT,EXCEL) and in different directory with the single FILE adaptor.
I know by using "." we ca get mutilple files, but here tthe files are of different format and in different directory.
Could you please explain as to how we can handle this scenarios?
Thanks
SahilHi,
The short answer is - "No".
The Long Question - "Why do you want to use a SINGLE channel".
If your idea is to reuse the interface then dont worry... Except for the Senderchannel and Sender agreement all your other objects can be reused ...provided your sender apter converts the different files into the same XML format..
For TXT you can use the simple file adpater..
For excel see if you can use save the file as .CSV format...then you can use it directlky by the simple FIle adapter..
For PDF use conversion agent... Here a blog to get u started on that ->
/people/shabarish.vijayakumar/blog/2009/05/17/trouble-writing-out-a-pdf-in-xipi
regards
Arvind R -
Create multiple files in different directories for receiver system
Hi,
My scenario is File-XI-File. Based on a value of a field(1...Unbounded) & its occurance in source file XI needs to create same file number of times(based on occurance of field in source file) in different directories on receiver system(Single Business System).
What different ways/solutions are available to achieve this?
Regards,
Bharat
Edited by: Bharat Rathod on Nov 21, 2009 5:24 PMHi Bharath,
>>Based on a value of a field(1...Unbounded) & its occurance in source file XI needs to create same file number of times(based on occurance of field in source file) in different directories on receiver system(Single Business System).
This logic needs to be handled in message mapping ... and you need to use multimapping..check the link here
http://help.sap.com/saphelp_nw04/helpdata/en/42/f3b31d48fb1bc8e10000000a11466f/content.htm
Regards
Suraj -
Creating a File under a directory
hi
I want to create a File under a specific directory,say "mydirectory" using BufferedDataOutputStream.How can i do it?
thanksBufferedDataOutputStream is not an existing class in the Java standard API. Did you mean BufferedOutputStream?
If you want to create a file under a specific directory, simply specify the complete path:
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream("C:\\mydirectory\\data.bin")); -
Creating Multiple Files with different name at Receiver side
Gurus -
Can anybd tell me how to generate multiple files at the Receiver side in the given target directory with different file names?
One source message will contain number "N" using which we have to generate files "N" number of times at the Receiver side.
Kindly help.hi,
are you following this blog?
provided you have SP>14 and no IDOC/HTTP involved.
and have you got the error you mentioned when testing with sample payload?
from where did you take the payload? if is from SXMB_MONI make sure you dont have <MESSAGE> tags in the payload,generally systems adds <MESSAGE> tags when you do multi mapping.
get the payload from SXMB_MONI right click ->view source payload(this is raw data) and test it.
it should be ok now.
and refer my discussion in the thread ,as I got he same error.
Split mapping created no messages -Mluti Mapping -
I have a copy of LIghtroom 5 on my office computer and a personal copy on my home computer. I convert my RAW files to DNG with Lightroom when I import them. Files I shoot for work also get imported on my home workstation. I noticed today that the resulting DNG files for the same RAW image are widely different in size. The ones at home are roughly twice as big as the ones from the office.
To the best of my knowledge, things are set up the same on both workstations. Any idea what setting might be causing this variation?I don't think it's possible to apply lossy compression when importing directly into Lightroom. I know you can do it with the DNG converter and on export but I don't think this is the case here.
In which case we need to determine which set-up producing is the "correctly" sized files. What's the camera and what are the respective file sizes from work and home? -
How to deploy war file in different directory?
I know one simple way to do deploy a war file is to dump it in webapps directory without a need a set server.xml. However, doing so will also inflate the war file in the webapps directory, which is not what I want.
I want to be able to drop the war file in the Tomcat webapps directory, but automatically gets inflated in my project specific directory (say C:\projectName).
How do I do that? Thanks.you should have a console option to do that so...
For example in WEBLOGIC you can get it through
http://localhost:7001/console
here you can do it you will come to know just by seeing that..
Similarly i think there will be a chance for others also. -
Creating same files on Different FTP Locations
Hi All,
My scenario is like this
IDOC which is coming from SAP has to be sent to two FTP locations (XYZ20082210.dat both same structures)...
Can any one please give me the best approach to handle this...
I know i can do this by creating in two ways
1) Using 1:N mapping
but this also i dont think the right approach as i need to duplicated the same Message Type and rename into 2 Message Type and use in the 1:N mapping.
2) creating 2 Message Mappings and two Interface mappings and two recievers ..
But this one XI processess the Mappings two times which is not good as we recieve multiple Idocs at a time...
Please suggest me a suitable approach for which way i can achieve by more Optmizing ...
Thanks and Regards,
sridhar reddyHi Sridhar,
If you want to work out this issue using OS command, then you configure your receiver file adapter to place the file in one folder say 'Source' . Let your two destinations be Target 1 and 2 in the network. Paste the below two lines in notepad, edit the path names and save as .bat extension.
xcopy D:\Source\.* "
NetworkPath\Target1"*
xcopy D:\Source\.* "
NetworkPath\Target2"*
If you receiver folders are in Windows network :
You should run the above mentioned bat file to copy your messages to the destination in network.
Note : XI can NOT execute a OS command/ shell script on the receiver FTP server. The OS Command for the file adapter only runs on the system in which the Adapter Framework is running.
If you receiver folders are in FTP Server :
Refer this link :
http://www.circa.ufl.edu/handouts/networks/ftp.html -
To create multiple files with same content but with different names
Hi SapAll.
here i have got a tricky situation on Idoc to File Scenario.
in my interface of an Idoc to file ,there is requirement to create multiple files with different file names but with same content based on one Idoc Segment.
which means there will be one Zsegment with two fields in the idoc,where one field with (content refers to the name which file name should start with .so lets say if this segment is repeated for 3 times then PI should create 3 files in the same directory with same content but with different file names (from the filed).
so here for now iam using one reciever file communication channel.
can any body give me the quick answer.
regards.
VarmaWhat do you mean by different names?
when i make proper setting in the Receiver Channel....on how to create the filename (what to append) like add Timestamp, counter, date, messageid.....even in this case you will ahve file with different names and that too from same File channel.
You can perform multi-mapping in XI/ PI and then your File channel will place the files in the target folder with relevant names. You cannot use Dynamic Configuration with Multi-Mapping!
If you intend to use different File channels, then do the configuration as required (normal)...even over here you can follow multi-mapping.
Do not use a BPM!
Regards,
Abhishek. -
Create cnf-files (sccp) for 7912G phone appears to be wrong
Hi again Cisco techs,
Have added file for 7912G phone.
Uploaded 7912 sccp firmware for 7912G phone via tftp-server and sh running-config confirms this
However. run create cnf-files shows differently. Same as sh telephony-service tftp-bindings shows 7960 files
Confirmed files via create cnf-files command
System replies with below error
CNF file creation is already On
Updating CNF files
%Error deleting flash:SEPDEFAULT.cnf (No such file or directory)
%Error deleting flash:XMLDefault.cnf.xml (No such file or directory)CNF-FILES: Clock is not set or synchronized,
retaining old versionStamps
CNF files update complete
cme_router(config-telephony)#
cme_router#
Have attached output of more sepdefault.cnf and xmldefault.cnf.xml and sh telephony-service tftp-bindings for analysis.
I suspect that first file is corrupt and 2nd file needs updating with correct information
Can you confirm this please?
Please advise if you can.That did not work, but using CS6 instead of CS5 seemed to do the trick. Perhaps I tried to use the old version on newer projects, and the program simply pronounce the file as corrupt.
Thanks for the comebacks. -
Standby database with different directory structure
Hi,
sorry to say that we are in desupported version due to some constraint.
oracle version : 8.1.7.0.0.
os:sun 5.9
I need to create physical standby database with different directory structure:
i have created standby database with same directory structure of primary, now i have requirement to create with different directory structure.
in oracle 8i we can not give multiple parameter for db_file_name_convert(ORA-01678: parameter db_file_name_convert must be two strings, a pattern and a replacement) and i do have partitions in primary as follows:
bash-2.05$ df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 20G 14G 5.6G 72% /
/proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
fd 0K 0K 0K 0% /dev/fd
swap 11G 40K 11G 1% /var/run
dmpfs 11G 0K 11G 0% /dev/vx/dmp
dmpfs 11G 0K 11G 0% /dev/vx/rdmp
swap 11G 656K 11G 1% /tmp
/dev/dsk/c1t0d0s3 25G 18G 6.8G 72% /oracle
/dev/vx/dsk/suportaldg/oracle1
12G 11G 1.1G 91% /oracle1
/dev/vx/dsk/suportaldg/oracle2
12G 8.1G 3.7G 69% /oracle2
/dev/vx/dsk/suportaldg/orapurge
200G 182G 17G 92% /orapurge
/dev/vx/dsk/suportaldg/oracle3
12G 10G 1.9G 85% /oracle3
/dev/vx/dsk/suportaldg/oracle4
12G 12G 58M 100% /oracle4
/dev/vx/dsk/suportaldg/oracle5
7.0G 5.9G 1.0G 86% /oracle5
/dev/vx/dsk/suportaldg/oracle6
7.0G 6.4G 564M 93% /oracle6
/dev/vx/dsk/suportaldg/oracle7
23G 23G 358M 99% /oracle7
/dev/vx/dsk/suportaldg/oracle8
13G 13G 165M 99% /oracle8
/dev/vx/dsk/suportaldg/oracle9
23G 22G 1.4G 94% /oracle9
/dev/vx/dsk/suportaldg/oracle10
12G 10.0G 1.9G 85% /oracle10
/dev/vx/dsk/suportaldg/oracle11
39G 36G 2.1G 95% /oracle11
/dev/vx/dsk/suportaldg/oracle12
39G 38G 1.1G 98% /oracle12
/dev/vx/dsk/suportaldg/oracle13
68G 65G 2.6G 97% /oracle13
/dev/vx/dsk/suportaldg/oracle14
200G 199G 1.3G 100% /oracle14
/dev/vx/dsk/suportaldg/oracle15
200G 196G 3.6G 99% /oracle15
/dev/vx/dsk/suportaldg/oracle16
70G 64G 5.5G 93% /oracle16
/dev/vx/dsk/suportaldg/oracle20
7.0G 6.4G 609M 92% /oracle20
/dev/vx/dsk/suportaldg/oracle50
28G 26G 2.0G 93% /oracle50
/dev/vx/dsk/suportaldg/oratranslog
185G 165G 19G 90% /oratranslogso how i can create standby database with different directory structure, help is appreciated.
Thanks
Edited by: prakashdba on Mar 5, 2009 11:04 PMLooks like very difficult and inform you mgmt about the drawbacks of running olderv ersions
may be you can try something like this but i dont know whether it is supported or not
db_file_name_convert=['/dev/vx/dsk/suportaldg/oracle3','/dev/vx/dsk/suportaldg/STDBY/oracle3']
db_file_name_convert=['/dev/vx/dsk/suportaldg/oracle4','/dev/vx/dsk/suportaldg/STDBY/oracle4']
db_file_name_convert=['/dev/vx/dsk/suportaldg/oracle5','/dev/vx/dsk/suportaldg/STDBY/oracle5']
Maybe you are looking for
-
List View Bound to XML Map Data
HI Have a list view that is bound to xml mapped data. It seems that on connection refresh that new data is not being updated into the SWF. My Binding is directly onto the cell ranges that are mapped into excel, so on updates the size of the maped t
-
Update Date Picture Taken in Photo
Since PE 4 only updates the Date Picture taken in the catalog and not the image file itself, is anyone aware of another product that will read the PE 4 catalog and update the image files?
-
PO account assignment authorization object
Dear Guru's, We want to restrict PO creation (ME21n) for certain Account assignment catagories (one for one particular plant and not system wide). Is there any Authorization oject for this using which we can restrict the creation? Kindly share your i
-
Oracle DBA perfomence tuning reference books
Hi, I am looking for oracle 10g performance tuning book. So, could you please advice some reference books name especially for performance tuning that could be based on UNIX and can have examples of reactive and proactive database performance monitori
-
Hi, I have one workbook with Purchase Order information in one of the report's column. I want to enable this workbook to jump to R3 T-Code ME23n to display that particular PO number selected. I have set the sender and receiver in T-Code RSBBS in NetW