Create dir structure and file name creation as specified
hai,
i need to create a directory structure as given.
dir: id/year/month/day/
how a file can be saved as given.
file: savecount-dd-hh-mm-filetype
String id = ...;
int year = ...;
int month = ...;
File f = new File(id + File.pathSeparator + year + File.pathSeparator + month + File.pathSeparator + day + File.pathSeparator + savecount + "-" + ...
// (Edit) file.createNewFile();
f.createNewFile();Message was edited by:
j_shadinata
Similar Messages
-
How to copy a dir structure with files and subdir's in to another dir
Hi there.
How can i copy a dir structure with files and subdirs to another dir structure
ie., all files and dirs in side the dir c:\aDir to c:\copyDir so i should get like c:\copyDir\aDir(all the files and subdirs of adir here)
Thanks in advance
MuthuFile f = new File(dirName);
if(f1.isDirectory()) {
String list = f.list();
then u have perform file io for each file and copy them to dir u want
[email protected] -
Dynamic file name creation using FTP adapter wired from a mediator
Hi All,
My Requirement is as follows....
Mediator is wired to Three FTP adapters to create three files.
File names are dynamic.
In the mediator those three routings, mappings and assignment for the directory and file name are being created.
But out of 3 files, 2 files are being created with the names mentioned during the FTP adapter configuration and the last one is being created
with the dynamic value.
Any help in this regard is highly thankful.
Thank you.
Srivatsasa.Create a UDF in mapping taking counter from IDoc as input parameter
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String totalFilename = "AAAA_" + counter;
conf.put(key,totalFilename);
return totalFilename;
Map output of this UDF to Top node at target.
you will not be able to see the result in test tab of mapping but it works end to end
Select Adapter Specific Message Attributes in receiver file adapter..here select filename checkbox -
I have 1000 images in a folder, i want to check their details like resolution, dimensions, color mode, file format, file size and file name into excel with nice user interface.
Pls help me, m just learning ABCD in VB.The code in the file at the link below might give you a starting point. Firstly it gives you the opportunity to list all of the properties of a file type and then you can select the properties that you want and the second utility gives you the
opportunity to list the selected properties for all files in a selected folder.
Download and extract the file and open the file in Excel.
Click the first button List Meta Data for One File (Run first)
Navigate to and Select any ONE individual photo file. (Photo files because that is what you indicated you are working with.)
You will be presented with a list of the available properties for the file. Where the Item value is blank, that property is not recorded for the particular file. Different file types have different properties and it is also dependent on how the file
was created but generally if all of the files come from the same source then the same properties are recorded for all files from that source.
Now insert a Y in column D for all of the required properties. (Don't select any with the Item value blank)
Click the second button List Selected Meta Data for all Files in a Folder (Run after selecting the required properties).
Next select a folder where the files reside. (You might need to back up to the folder if dialog is blank because it will not show individual files because the code only allows Folders.)
You will be presented with a report listing all of the selected properties for all of the files in the selected folder.
The user interface is not that great but you can improve on that if you want to with a Userform as you get to know VBA a little better.
Download the file from here.
https://onedrive.live.com/redir?resid=C2A7A5912D3D17B0!273&authkey=!ANf8R0Xf0-h3wJ8&ithint=file%2czip
Regards, OssieMac -
Path and file name problem when I want to download files from html
Hi all,
I want to write a small program to allow users download files from jsp file
but the following files don't work .
<%@ page language="java" import="java.net.*,java.io.*"%>
<%@ page import ="java.util.*"%>
<%
try
String SContent = request.getParameter("click");
String SDocName = "temp.doc"; // out put file File Name
ServletOutputStream stream= response.getOutputStream(); // Getting ServletOutputStream
response.setContentType("application/msword"); // Setting content type
response.setHeader("Content-disposition","attachment;filename=\"" +SDocName+"\""); // To pop dialog box
BufferedInputStream in = new BufferedInputStream(new FileInputStream(SContent));
int c;
while ((c = in.read()) != -1){
stream.write(c);
in.close();
stream.flush();
catch(final IOException e)
System.out.println ( "IOException." );
catch(Exception e1)
System.out.println ( "Exception." );
%>I am so confuse, what is the path and file name I sould give ? for example my click should equal to http://******/Test/display.jsp?click=00-1Hi all,
I got error at
java.lang.IllegalStateException: getOutputStream() has already been called for this response
org.apache.coyote.tomcat5.CoyoteResponse.getWriter(CoyoteResponse.java:599)
if I want ot download file from html file.
String SContent = request.getParameter("click");
if I hard code like follow it work fine.
String SContent ="C:/Project Coding.doc";
what mistake I make.
Thank you! -
Get path and file name from Bfile
Hi,
I'm using Bfile to store images in a database. Is there a way to get the path and file name of the image from Bfile, because I need to pass that information into an image processing function.
Many thanks.
SheldonCan you use FILEISOPEN in the DBMS_LOB package?
See http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl03prg.htm#281893
-- CJ -
Definnig logical path and file names
hallow experts,
i wont to now about definnig logical path and file names,
did some one have something that can help me in that
regardsHi Rodrigo,
Have a look at this link... i guess it explains what you are looking for...
http://help.sap.com/saphelp_47x200/helpdata/en/8d/3e4ec2462a11d189000000e8323d3a/content.htm
regards,
Naveen -
I am running Illustrator CS4 on Windows XP.
I have obtained a script that inserts the file name in the bottom left of the page
// CODE BEGIN
var pointTextRef = app.activeDocument.textFrames.add();
pointTextRef.contents = app.activeDocument.name;
pointTextRef.top = 20;
pointTextRef.left = 10;
// CODE END
What I would like is that it inserts the path name as well ie
"c:\temp\file.ai"
rather than just the file name "file.ai"
Is there anyone out there who can help me.
Thank YouHi Mark,
Thank you for this script.
It works fine, just as I wanted.
Much appreciated.
Cheers
Eddie Frankel
Technical Officer
Department of Primary Industries
55 Collins Street
Melbourne
GPO Box 4440
Melbourne
Vic. 3001
Phone: 03 9 658 4539
Fax: 03 9 658 4555
Email: [email protected]
This e-mail and any attachments may contain information that is
confidential, legally
privileged and/or copyright. If you are not the intended recipient, any
use, disclosure
distribution or reliance on the information contained in this e-mail is
unauthorised.
You should only re-transmit or distribute the information if you are
authorised to do so.
If you have received this e-mail in error please notify the Department of
Primary Industries
by return e-mail and destroy all copies printed or held on any computer.
DPI does not warranty that this e-mail and any attachments are free of
viruses.
Muppet Mark <[email protected]>
02/10/2009 09:25 PM
Please respond to
[email protected]
To
eddie frankel <[email protected]>
cc
Subject
path and file name
I think you want is 'fullName'
var docRef = app.activeDocument
var pointTextRef = docRef.textFrames.add();
pointTextRef.contents = docRef.name + ' ' + docRef.fullName;
pointTextRef.top = 20;
pointTextRef.left = 10; -
Path and File name of the attachment
Hello Srm Guys,
Where should be the Path and File name of the attachment are stored for a shopping card Item.
Thanks
RamHello Ram,
Execute the function module BBP_PROCDOC_ITEM_GETDETAIL by providing the item guid,object type . Now it will populate the et_attach importing parameter with the attatchement details.
In the ET_ATTATCH internal table , the field PHIO_FNAME/PHIO_PATH_FILE provides the physical storage location of the document.
Hope this info will be helpful.
Regards,
Mani -
How to show rating dots and file name underneath thumbnail in Bridge CS4 preview workspace?
How to show rating dots and file name underneath thumbnail in Bridge CS4 preview workspace?
Thank you! That was it. The option to change it is not available in preferences (though I believe it was in early CS versions). It's hidden in a dropdown menu associated with an icon at the top. It sure wasn't easy to find, and I probably would not have done so without your lead. Thanks again!
-
Need script to add path and file name to fillable form
I have a fillable pdf form that I would like to have a script that adds the path and file name to the form. This script would be in a field at the end of the document.
I am a newbie to javascript and formcalc. The script will be the only one in the form.
Thanks for any assistance.
LisaHi,
I have a sample that attach a file to the PDF and write in a text field the file name. I don´t know how to get the full path and it only works in Acrobat. To work in Adobe Reader is necessary the LC Reader Extensions to give some special permissions to the document. But, regard this, you still want the sample send me a email to [email protected]
Best Regards, -
Max length of VI file paths and file names
Hi,
Is there a maximum allowed length of VI file paths and file names in LabVIEW? I'm running LV 6.0.2i on NT and is trying to save a VI inside a LLB and LabVIEW crashes each time. I have also tried to copy the VI from the LLB to a temp folder with the Librarian VI, but LabVIEW crashes as well. The total length of the file path is around 260 characters and I strongly suspect the file path length in combination with LLB because when I use a shorter path the problem disappear. If I use a long path without LLB (just regular VIs) a warning appear "Invalid file name" instead of LabVIEW crashing.
Does anybody know the solution to this problem or must I use shorter filepaths? Perhaps it depends on which platform I am running
LV on?
Sincerely,
Mattias Ericsson"Mattias Ericsson" wrote in message
news:[email protected]..
> Hi,
>
> Is there a maximum allowed length of VI file paths and file names in
> LabVIEW? I'm running LV 6.0.2i on NT and is trying to save a VI inside
> a LLB and LabVIEW crashes each time. I have also tried to copy the VI
> from the LLB to a temp folder with the Librarian VI, but LabVIEW
> crashes as well. The total length of the file path is around 260
> characters and I strongly suspect the file path length in combination
> with LLB because when I use a shorter path the problem disappear. If I
> use a long path without LLB (just regular VIs) a warning appear
> "Invalid file name" instead of LabVIEW crashing.
>
> Does anybody know the solution to
this problem or must I use shorter
> filepaths? Perhaps it depends on which platform I am running LV on?
I believe windows has a 255 character pathname (file+path) limit. We once
had that problem because we had a long filename and a longer pathname.
Moved the directory up a couple levels and problem solved. -
Number of SNP tables created during master and work repository creation
Hi All,
I would like to know how many SNP tables are created during Master and work repository creation in
10.1.3.5 v as I remember it was around 147 in earlier version .
Any help will be appreciated
regards,
Palash ChatterjeeHi Palash ,
ODI master repository have 58 SNP tables
where as work repository have 88 SNP tables
So in total 146 SNP tables are created during Master and work repository creation in
10.1.3.5 .
Thanks,
Sutirtha -
Both type and assembly name must be specified
Hi All,
I have 3rd party dll, I am adding the ref to it in my project.
I have created a wrapper class for one of the 3rd part dll class, my wrapper class is inheriting for IPofSerializer and serilizing the object.
In my pof-config.xml file I have created a new user-type for the class in the 3rd party dll.
<pof-config xmlns="http://schemas.tangosol.com/pof">
<user-type-list>
<!-- include all "standard" Coherence POF user types -->
<include>assembly://Coherence/Tangosol.Config/coherence-pof-config.xml</include>
<!-- include all application POF user types -->
<user-type>
<type-id>1002</type-id>
<class-name>DCBOMLib.DCStockMarketClass</class-name>
</user-type>
</user-type-list>
</pof-config>
While starting the Cache i am getting the error "Both type and assembly name must be specified", where so i find the assembly info for the type DCBOMLib.DCStockMarketClass(its a 3rd party dll)
Regards,
AkhilHi,
Thanks for the reply, pls find some more details below:
1. Contents of pof-config.xml
<pof-config xmlns="http://schemas.tangosol.com/pof">
<user-type-list>
<!-- include all "standard" Coherence POF user types -->
<include>assembly://Coherence/Tangosol.Config/coherence-pof-config.xml</include>
<!-- include all application POF user types -->
<user-type>
<type-id>1001</type-id>
<class-name>Examples.ContactInfo,ContactCache.Windows </class-name>
<serializer>
<class-name>Examples.ContactInfoSer, ContactCache.Windows</class-name>
</serializer>
</user-type>
<user-type>
<type-id>1002</type-id>
<class-name>DCBOMLib.DCStockMarketClass, Interop.DCBOMLib</class-name>
</user-type>
</user-type-list>
<allow-interfaces>true</allow-interfaces>
<allow-subclasses>true</allow-subclasses>
</pof-config>
If i dont specify type-id 1002 it says unknown user type DCBOMLib.DCStockMarketClass
2. Pls find the code
public class ContactInfoSer : IPofSerializer
public object Deserialize(IPofReader reader)
string Name = reader.ReadString(0);
string Street = reader.ReadString(1);
string City = reader.ReadString(2);
string State = reader.ReadString(3);
string Zip = reader.ReadString(4);
DCBOMLib.DCStockMarketClass DCSCM = (DCBOMLib.DCStockMarketClass)reader.ReadObject(5);
reader.ReadRemainder();
return new ContactInfo(Name, Street, City, State, Zip, DCSCM);
public void Serialize(IPofWriter outo, object o)
ContactInfo cinfo = (ContactInfo) o;
outo.WriteString(0, cinfo.Name);
outo.WriteString(1, cinfo.Street);
outo.WriteString(2, cinfo.City);
outo.WriteString(3, cinfo.State);
outo.WriteString(4, cinfo.Zip);
outo.WriteObject(5, cinfo.DCSCM);
outo.WriteRemainder(null);
During runtime I am getting following exception for the below code
DCBOMLib.DCStockMarketClass dc = new DCBOMLib.DCStockMarketClass();
ContactInfo contact = new ContactInfo(txtName.Text,
txtStreet.Text,
txtCity.Text,
txtState.Text,
txtZip.Text,dc);
cache.Insert("124", contact);
Exception -
{"Missing IPofSerializer configuration (Config=file://Config\\pof-config.xml, Type-Id=1002, Type-Name=DCBOMLib.DCStockMarketClass, Interop.DCBOMLib)"}
Is it required that the 3rd party dll having DCBOMLib.DCStockMarketClass should be inheriting from Serializable or Object?
Regards,
Akhil -
Creating a structure, knowing the name and the type of the components
hi, following problem:
i have uploaded an excel file from a different system with the information about the names and the types of the components of several structures.
how can i create a structure with this informatin on my system?ok, i think i have to give you some more details:
i want to update a table from a table saved on another system using a report.
(only inserts are important, no updates)
the problem is, that tables may not have the same components.
therefore i have created several excel sheets with following content (using mehtod gui_download):
name1 ; name2 ; name3.... | name of the component
typ1 ; typ2 ; typ3 ... | type of the component
content11 ; content12 ; content13
content21 ; content22 ; content23
uploading the file into table <uploadtable>
now need dynamic structure: let' s say dynamicwa
name1 typ1
name2 type2
then: loop at <uploadtable> into dynamicwa.
move-corresponding dynamicwa to destinationwa.
insert destination_wa into destination_table.
endloop.
but how can i create this dynamicwa?
Message was edited by: Michael
Michael Dirndorfer
Maybe you are looking for
-
I am not allowed to use Outlook email at my workplace. It seems that I cannot use only the Outlook calendar to sync my Iphone without making it my primary email client. I need to have a desktop calendar of some sort at my work in order to manage my a
-
BPM: read value of simple container variable in mapping
Hi everybody, is this possible via UDF? Regards Mario
-
HT2729 no video on iTunes movies or TV shows
no video on iTunes movies or TV shows
-
ADF Faces: Making a selectOneChoice in java code?
I need to make a selectOneChoice to reuse in my pages (country selection) but can't seem to find how to do it on the web? here is what i've attempted with the error output... -------------------- the java code: public void contextInitialized(ServletC
-
Finder spontaneously force quitting
Hello! About a week ago I updated my 2011 Macbook Pro to Yosemite and had no issues except I noticed that the Finder was constantly "Not Responding" but I was able to access it by going to File->New Finder Window despite this issue. Then last night,