How to create a new file (doc, ppt or xls) using the secondary click??
Is there any way to create a new file(text, doc, docx, ppt, pptx, xls or xlsx) using the the secondary click (on the desktop or any folder) just like creating a new folder using secondary click! Please do let me know!
No. You need the Office applications to create them or another application capable of creating those types of files or at least saving files in those formats.
Similar Messages
-
hello
how to create a new file myfile.txt in folowing URL
http://www.mydomain.com/upload/myfile.txtregardsthe_Orient wrote:
corrected code
I will to create a text file on webserver
this file hasethe content "Hello World"
</div>
try
String S="Hello World"
URL url = new URL("http://www.mydomain.com");
URLConnection hpCon = url.openConnection();
hpCon.setDoOutput(true);
File file = new File("http://www.mydomain.com/studentes/info.txt");
file.createNewFile();
// how to use FileOutputStream here
OutputStreamWriter out = new OutputStreamWriter(hpCon.getOutputStream());
out.write(content);
out.close();
}catch(Exception ex){ex.printStackTrace();}
Exception :
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
{code}
regards
Whoa! Do you know what you're doing? Do you have permission to write on that URL? Or does the pathname parameter you passed on File is correct? How about let the server-side handle the creation of file for you by just requesting it? Do you know how to create a server-side Java program (e.i. Servlet)? Umm.. There's a Java tutorial for this for you to get started: [Reading from and Writing to a URLConnection|http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html].
Ron
Server-Side Development Team
[Java-Man 2004|https://sites.google.com/site/raisoftware6/] -
How to create a new file - help please.
hi there
i need to create a new file in my program, i did the following:
/*code--------------------
PrintWriter out = new PrintWriter(new FileOutputStream(new File("c:\\somedirectory\\outputfile.txt")));
out.println("product code:"+productCode);
out.println("product price:"+productPrice);
out.println("product description:"+productDes);
out.flush();
out.close();
the directory c:\somedirectory\ does not exist yet. i was hoping that when the new file is created, so was the directory. when i run it. the program could not find the path with following error message:
c:\somedirectory\outputfile.txt (The system cannot find the path specified)
can anyone of you experts point a rigth solution? thank you.thanks
so the steps to create a new file in a new directory is as follow:
//create a file object with the directory path
File d = new File("c:\\xx\\");
d.mkdir();
//then create another file object with the path and the file name
File f = new File("c:\\xx\\abc.txt");
is this right? -
How to create a new file with existing file's resource fork?
Hello,
I would like to create a new file that has the resource fork of an existing file. I had though of making a copy of the existing file, seek to the beginning of the copy and write the new data, but for large files, that creates the whole file even when not needed. I currently create the new file with [NSFileManager createFileAtPath: contents: attributes:], but attributes do not include resource fork items, like custom icons, color label, etc.
[NSURL resourceValuesForKeys] gives a common subset of resource data, like icons and color label, but that's about it. Is there some way to get the resource fork or a copy of the file without getting the whole file?
ThanksWhat are you trying to do here? While resource forks might still be quasi-supported, you really shouldn't be thinking about them as such. Instead, think in terms of extended attributes. You can use the low-level xattr() functions to get some of that or you can use the new NSURL methods.
-
HOw to create a Batch file for java application and whats the use of this ?
HI,
How to create a Batch file for java application ?
And whats the use of creating batch file ?
Thanks in advanceFirst of all, you're OT.
Second, you can find this everywhere in the net.
If you got a manifest declaring main class (an classpath if needed), just create a file named whatever.bat, within same directory of jar file, containing:
javaw -jar ./WhateverTheNameOfYourJarIs.jar %*By the way, assuming a Windows OS, you can just double click the jar file (no batch is needed).
Otherwise use:
javaw -cp listOfJarsAndDirectoriesSeparedBySemiColon country/company/application/package/className %*Where 'country/company/application/package/' just stands for a package path using '/' as separator instead of '.'
Don't specify the .class extension.
Javaw only works on Windows (you asked for batch, I assumed .BAT, no .sh), in Linux please use java.exe (path may be needed, Windows doesn't need it 'cause java's executables are copied to system32 folder in order to be always available, see PATH environment variable if you don't know what I'm talking about) and use ':' as classpath (cp) separator.
The '%***' tail is there in order to pass all parameters, it only works on Windows, refer to your shell docs for other OSs (something like $* may work).
This way you have a command you can call to launch your code (instead of opening NetBeans just to see your app working). You could schedule tasks on it or just call it in any command prompt (hope you know what it is 'cause there have been people in this very same forum with no clue about it, if not just hold the 'Windows button' and press 'R', then type 'cmd' and run it).
Finally add dukes and give 'hem away.
Bye. -
How to create a new wage type in IT0014 and assign the GL?
Dear Gurus
Please guide me about Creating of new wage Type in 14.
My client wants to add a new wage type says:-1HRR ( Honorarium) & assign the same to Training Expenses GL account and order number. How to do it. Please guide.
Regards
Vikas K SharmaTo copy a standard WT and assign a new name with the same attributes and characterstics:
IMG > Personnel Management> Personnel Administration> Payroll data> Recurring Payments and Deductions. Copy any standard Wage Type.
Check assignment of WT to a Symbolic Account :
(The WT will inherit the Symbolic account from the copeid standard WT)
Go through SM30 to Table V_T52EL_NOFM. Make neccessary changes to the Symbolic account, if needed.
To create a new Symbolic Account and assign it to the WT:
Payroll --> Payroll (country) --> Posting to Financial Accounting --> Activities in the HR-System --> Employee grouping and symbolic accounts --> Define symbolic accounts
To assign the WT to the new symbolic account (same as table V_T52EL_NOFM):
Payroll --> Payroll (country) --> Posting to Financial Accounting --> Activities in the HR-System --> Wage Type Maintenance --> Define WT posting attributes
To assign a symbolic account to a G/L or Check the assignment of Sym Acc to G/L:
Payroll --> Payroll (country) --> Posting to Financial Accounting --> Activities in the AC-System -->Account Assignment --> Assign expense accounts.
Hope this helps.
Soujanya. -
How to create a new cell attribute and add adorner to the cell
Hi
I am relatively new to InDesign and wanted to do the following
I want to add a new boolean attribute to a selected table cell. When this attribute is set, I would want to draw one line vertical and one line across the selected cell ( kind of like a "Plus" sign over the cell). I am wondering how to go about doing this.
PS: I read the snippet snpManipulateTableStyle and can see how to change a cell style using existing attribute (kcellAttrFillColorBoss). However in my case, i want to create a entirely new boolean attribute and based on it being true or false, I would want to draw the adornment on the cell
Any help with this would be greatly appreciated..
thanks!
SamI would create the new site first, then promote the new domain controllers and add them to the site. You can do this during the dc promote process.
There's step by step guides already available for creating a site so I don't see any point reinventing one.
Here's one:
http://www.petri.co.il/create-active-directory-sites-windows-server.htm
You may have to adjust the site links part since it looks like Site 3 will only be linked to Site 1.
Of course, the IP addresses for the domain controllers in Site 3 have to be in the IP subnet configured for that site.
Using the example above, you'll of course have to enter the information that makes sense for your netwrok.
I doubt anyone will create a custom step by step for you using the information you provided (they'd also have to know your subnets for one thing) but then, who knows.
Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. -
How to create a jpg file for a desired part of the canvas
i hav to create a jpg file from the canvas which contains basic shapes which are drawn using methods like drawOval(),drawRectangle(). i need only a part of the canvas to be saved as a jpg file i.e for example from xpos 50-100 & ypos 200-250.i need all the portions of the shapes already drawn in that area as a jpg file..
can anyone help me?import java.awt.*;
import java.awt.event.*;
import java.awt.image.BufferedImage;
import java.io.*;
import javax.imageio.ImageIO;
public class CanvasClip extends Canvas implements ActionListener
Rectangle clip;
boolean showClip;
public CanvasClip()
clip = new Rectangle(50, 50, 150, 150);
showClip = false;
public void paint(Graphics g)
super.paint(g);
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
int w = getWidth();
int h = getHeight();
int dia = Math.min(w,h)/4;
g2.setPaint(getBackground());
g2.fillRect(0,0,w,h);
g2.setPaint(Color.blue);
g2.drawRect(w/16, h/16, w*7/8, h*7/8);
g2.setPaint(Color.red);
g2.fillOval(w/8, h/12, w*3/4, h*5/6);
g2.setPaint(Color.green.darker());
g2.fillOval(w/2-dia/2, h/2-dia/2, dia, dia);
g2.setPaint(Color.orange);
g2.drawLine(w/16+1, h/16+1, w*15/16-1, h*15/16-1);
if(showClip)
g2.setPaint(Color.magenta);
g2.draw(clip);
public void actionPerformed(ActionEvent e)
Button button = (Button)e.getSource();
String ac = button.getActionCommand();
if(ac.equals("show"))
showClip = !showClip;
repaint();
if(ac.equals("save"))
save();
private void save()
int w = clip.width;
int h = clip.height;
BufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = img.createGraphics();
g2.translate(-clip.x, -clip.y);
paint(g2);
g2.dispose();
String ext = "jpg"; // or "png"; "bmp" okay in j2se 1.5
try
ImageIO.write(img, "jpg", new File("canvasClip.jpg"));
catch(IOException ioe)
System.err.println("write error: " + ioe.getMessage());
private Panel getUIPanel()
Button show = new Button("show clip");
Button save = new Button("save");
show.setActionCommand("show");
save.setActionCommand("save");
show.addActionListener(this);
save.addActionListener(this);
Panel panel = new Panel();
panel.add(show);
panel.add(save);
return panel;
public static void main(String[] args)
CanvasClip cc = new CanvasClip();
Frame f = new Frame();
f.addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
f.add(cc);
f.add(cc.getUIPanel(), "South");
f.setSize(400,400);
f.setLocation(200,200);
f.setVisible(true);
} -
Hi i wanted to create an .exe file extract the content from .zip using winzip extractor, please
see the below piece of code. the same is working in 32bit machine, but not working in 64bit machine windows server 2008
private bool CreateExeFile(string directoryPath, string zipFileName)
bool status = false;
string emuPath = String.Empty;
emuPath = System.Configuration.ConfigurationManager.AppSettings["winzipSe32Loacation"];
//string emuParams = @" -e " + directoryPath + "\\" + zipFileName + ".zip " + directoryPath;
string emuParams = " " + directoryPath + zipFileName + ".zip -win32 -y ";
//string emuParams = " " + directoryPath + zipFileName + ".exe a " +zipFileName +".Exe -mmt -mx5 -sfx" + directoryPath;
try
Process p = new Process();
ProcessStartInfo psI = new ProcessStartInfo(emuPath, emuParams);
psI.CreateNoWindow = false;
psI.UseShellExecute = true;
p.StartInfo = psI;
p.Start();
p.WaitForExit()
status = true;
catch
status = false;
return status;
Regards
BharathHello,
What error with you program?
if the reply help you mark it as your answer.
Free No OLE C#
Word, PDF, Excel, PowerPoint Component(Create,
Modify, Convert & Print) -
How to create a connection pooling in Netbeans 6.0 using the oracle driver
hi all,
I am using Netbeans 6.0. Apache Tomcat 6.0.14 server, oracle 9i.
I tried to create a connection pooling using tomcat web server.
I have included the following code in context.xml and web.xml.
CONTEXT.XML:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/network1">
<Resource name="jdbc/myoracle"
auth="Container"
type="javax.sql.DataSource"
username="scott"
password="tiger"
factory="BasicDataSourceFactory"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:odbc:thin:@127.0.0.1:1521:mydb"
maxActive="20"
maxIdle="10"
maxwait="-1"/>
</Context>
WEB.XML:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/myoracle</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
After that i have included the following JDBC driver's jar files in the $Catalina_Home/lib folder.
classes 111.jar,
classes 111_g.jar
classes12.jar
classes 12_g.jar
classes12dms.jar
classes12dms_g.jar
nls_charset11.jar
nls_charset12.jar
ocrs12.jar
ojdbc14.jar
ojdbc14_g.jar
Then i stop the tomcat web server and start it again.
In jsp page i have included the following code:
Context ctx=new InitialContext();
Context envctx=(Context)ctx.lookup("java:comp:env");
DataSource ds=(DataSource)envctx.lookup("jdbc/myoracle");
Connection con=ds.getConnection(); ----->(In this line an error occured that Connection class cannot be found.)
please help me how to create a connection pooling and rectify the error in conneciton.
Thanks in advancePlease refer
http://www.netbeans.org/kb/60/web/customer-book.html -
How to create a domain for a non-root user using the JES installer
Some questions have been circulating on what are the steps to create a whole domain configuration using a non-root user. Here is one method that you can try....
- Login as user "testuser", all operations are using the user I want to start the whole domain with
- cd to the testuser home directory and created apptest (mkdir apptest)
-created domain
/opt/SUNWappserver/appserver/bin/asadmin create-domain adminuser admin adminport 4849 --domaindir /testuser/apptest testdomain
Please enter adminpassword>adminadmin
Please enter adminpassword again>adminadmin
Please enter the master password>adminadmin
Please enter the master password again>adminadmin
- created nodeagent
/opt/SUNWappserver/appserver/bin/asadmin create-node-agent user admin port 4849 password adminadmin agentdir /testuser/apptest testnode
Please enter the master password>adminadmin
- Start the domain
/opt/SUNWappserver/appserver/bin/asadmin start-domain domaindir /testuser/apptest user admin testdomain
Please enter password>adminadmin
Please enter the master password>adminadmin
Domain testdomain started.
- Start the nodeagent
/opt/SUNWappserver/appserver/bin/asadmin start-node-agent user admin agentdir /testuser/apptest/ testnode
Please enter password>adminadmin
Please enter the master password>adminadmin
Command start-node-agent executed successfully.
- create instance
/opt/SUNWappserver/appserver/bin/asadmin create-instance nodeagent testnode user admin i1
Please enter password>adminadmin
Command create-instance executed successfully.
- start instance
/opt/SUNWappserver/appserver/bin/asadmin start-instance --user admin i1
Please enter password>adminadmin
Command start-instance executed successfully.And this can be used to the incident priority (same technique can be used for problems):
private int GetIncidentPriority(EnterpriseManagementGroup emg)
try
//Get the incident settings class
ManagementPackClass mpc = emg.EntityTypes.GetClass(new Guid("613c9f3e-9b94-1fef-4088-16c33bfd0be1"));
//Get the emo for the incident settings
EnterpriseManagementObject emo = emg.EntityObjects.GetObject<EnterpriseManagementObject>(mpc.Id, ObjectQueryOptions.Default);
//Get the priority maxtrix and convert to XML
if (emo[mpc, "PriorityMatrix"].Value != null && emo[mpc, "PriorityMatrix"].Value.ToString() != "")
string sMatrixXML = emo[mpc, "PriorityMatrix"].Value.ToString();
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(sMatrixXML);
//Get the guid strings for impact and urgency (note - xml goes by urgency then impact)
string sUrgencyGuid = "04b28bfb-8898-9af3-009b-979e58837852";
string sImpactGuid = "11756265-f18e-e090-eed2-3aa923a4c872";
foreach (XmlNode urgencynode in xmlDoc.ChildNodes[0].ChildNodes)
if (urgencynode.Attributes.Count == 1 && urgencynode.Attributes["Id"].Value.ToString().ToLower() == sUrgencyGuid)
foreach (XmlNode impactnode in urgencynode.ChildNodes)
if (impactnode.Attributes.Count == 1 && impactnode.Attributes["Id"].Value.ToString().ToLower() == sImpactGuid)
XmlNode prioritynode = impactnode.ChildNodes[0];
return Convert.ToInt32(prioritynode.InnerXml);
return 0;
catch
return 0;
Rob Ford scsmnz.net
Cireson www.cireson.com
For a free SCSM 2012 Notify Analyst app click
here -
How to create a new file having a name that is stored in a string
Hello friends i am new to java and i need your help .
I have a string which will take different values at run time. I want to create a file which has the same name as stored in the string . Can anyone help me?The Java Almanac example I linked to uses createNewFile() - the API documentation is not particularly clear about exactly what happens if c:\some\value\assigned\at doesn't already exist. But you're only a small experiment away from finding out!
Another page gives examples of directory creation.
http://www.exampledepot.com/egs/java.io/CreateDir.html
Once (or if) the file is created using a File then, yes, that File is the name of the file: parent directories and all. If you create a FileReader based on the File it will read from the right place. -
Is it possible to have the elements.xml file create a page in the Pages (or SitePages) library without actually including any sort of page layout or aspx artifact in the feature?
I see no reason to add a mywebpartlayout.aspx to my feature just so I can deploy a Home.aspx based on the BlankWebPart.aspx page layout.
I'm sure there is something obvious I am missing with regards to the Elements schema (which is why I've almost given up on using it completely and just gone to pure C#) but
I would really like to do this kind of simple stuff with declarations if at all possible. Must less code to write, debug, test and maintain.I don't see how my question keeps getting misunderstood. This seems to be very clear and clearly not answered: "Is it possible to have the Elements.xml file
create a page in the Pages (or SitePages) library without actually including any sort of page layout or aspx artifact in the feature?"
I can't be more clear than "without including ANY sort of page layout or aspx artifact (meaning anything ending in aspx) IN THE FEATURE". I am not capitalizing to yell,
only to emphasize. Your disagreement is based on a link that shows ADDING AN ARTIFACT (the dummy MyPage.aspx) to a feature. I am asking if it
is possible (again, I cannot be more clear) to just use an Elements.xml file to instruct SharePoint to make a new item in a Pages or SitePages library.
Your definition of page includes Page Layouts and what you call Web Part Pages (again, a type of page layout + data in a site pages list that says what webparts
to display). Page Layouts are clearly NOT items stored inside of a SitePages or Publishing Pages library. Those libraries are just lists whose records
define the parts to show inside a specific layout.
When I refer to a Page I mean an entry into a pages (site pages/publishing pages) list. If I wanted to deploy a page layout then, quite obviously, I would need
to include it into my solution. I think maybe you are assuming that I do not know the difference. I do. The question is, can an Elements file alone be enough to instruct SharePoint to make a new entry into a Pages or SitePages library.
Now, your second link does show how to reference an existing Page Layout. Thank you for that. It is excellent. But this still leaves the problem of having to
add some sort of aspx page into the solution. Let me try to explain why I feel this SHOULD BE unnecessary: The aspx file will not have anything on it if I am referring to the ~sitecollections/.../BlankWebPartPage.aspx layout.
All web parts and content that should appear on the new page can be described IN the Elements.xml file. Any sort of aspx file is unnecessary, it seems to me.
So, if I am referencing a ~sitecollections/.../BlankWebPartPage.aspx page layout and specifying the web parts to add to the page, why should there be a
requirement to have some aspx file within the feature? That's what I am trying to figure out.
I am not asking for source code as proof. I am asking for an Elements file that does NOT reference anything AT ALL inside the Visual Studio solution for reasons I just described.
If you do not know how to do it then perhaps it cannot be done but I would like the question to stay unanswered for a little while until someone can demonstrate either a) it CAN
be done or b) a link to some Microsoft document stating that it is MANDATORY to have a physical element within the feature that gets copied to the environment.
I think it is important to understand what is being asked before insisting you have answered. It is clear from your posts that you have not fully understood the question yet but
I am hoping this posts makes it clear. I really appreciate you taking the time to respond, though. You seem to be the only one up for the challenge! :) -
I created an interactive document and will export as a swf. I would like to create a button in the interactive document to launch and external "exe." file. Is this possible.
You will need to create custom web part editor. Look at the following example. It also have added button and its events. I am sure you can use this sample as base and code your logic.
http://msdn.microsoft.com/en-us/library/hh228018(v=office.14).aspx
Amit -
Any help would be appreciated, thanks.
I already have purchases linked to my existing NZ Apple ID, and will still be using them. However, once the US Apple ID is set up I will use that predominantly from both devices for any new purchases (and Apple TV).
I also understand that iOS5 made a change that says there is a 90 day hold on changing between Apple ID's on the same device. Does anyone know if this is true?You will lose data from whichever was the 2nd to last to sync .
Don't do it.
Maybe you are looking for
-
Can't FTP from a Mac to a Mac through ABS but can from a PC to Mac
Hi all, I have a problem trying to FTP from a Mac to a Mac through my ABS but can do so from a PC (windows machine). I have a webserver http://jeanmatthieu.free.fr/pureftpd/ installed on one of my Macs which is connected to the internet via my ABS (s
-
Applications from my iTunes are NOT AUTHORIZED to sync with my iPhone
Hi all, I need help! I had bought a new MacBook and while I downloaded some new applications in my new comp in the iTune store and try sync-ing them into my iPhone3G that had been previously sycn-ed with my ex-Mac computer, it pop-ed up a screen sayi
-
Set default save for documents to Full Size
My Acrobat 9 Standard got reset to save my documents at 10%, I need to save them at 100% without resaving every document under Save as.
-
How do I retrieve a lost ap?
How do I retrieve a lost app from iCloud that had been backed up?
-
Java VM Please help, Cannot remove and cannot Reinstall.
hello, I hope somebody can help me out here, I'm at my wits end. First of all I have xp pro file system NTFS, I have AOL DSL Broad band. I have attempted to get my Java Download DAYS ago and something went terribly wrong. After the download I noticed