Delete File from URL located on HTTP Server.
Hello All, could you anybody help me with my Problem. I need to delete some File in URL located on HTTP Server. The File was created via using of the Function 'DP_CONTROL_SEND_STREAM_TO_URL'. Any Times I need to delete this File from the url Location, but I cann't find any Functions or Method of any Class (GUI 6.20) to realise that. I read lot of very good Blogs from Thomas Jung about HTTP classes, but I cann't find somthing relevant for me...
Sincerely Yours,
Lubomir
Hi,
You can try with GUI_DELETE_FILE and give http location in FILE_NAME
or WS_FILE_DELETE.
I am not getting any CNDP function module for your purpose.
Hope you will get sucess..
Thanks,
Chetan Shah
Similar Messages
-
Need to download JAR files from more than ONE HTTP-server ?
Hello,
We have a need to download JAR files for an application, from more than ONE HTTP-server, i.e. any specified HTTP-server in an extremely secure network.
Does a solution exist for this requirement ? Is it possible to design a solution our selfes for this problem ?
Best Regards
PeterWe have a need to download JAR files for an
application, from more than ONE
HTTP-server, That can be done using the extension element
from within the resources element of the main JNLP.
http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/syntax.html#resources
The extension element should refer to another JNLP
(on the other site) that refers to the Jars. The jar files
in any such (foreign) JNLP need to be signed, and the
JNLP files should declare itself as a <component-desc>.
For any level of detail on using extensions/components,
download the spec. mentioned in the second paragraph
of that section linked above. Unfortunately I can find no
web browsable form of the information.
Here is an example though..
http://www.javasaver.com/testjs/jws/04/glclock.jnlp
This (sandboxed) screenaver demo comes off my
javasaver site. It refers to the JOGL API via an
extension element in the JNLP, that points directly
to the JOGL site. You might notice the security
warning that is produced mentions..
Name: JOGL
Publisher: sun microsystems, inc
Source: https://jogl.dev.java.net
..i.e. any specified HTTP-server in an
extremely secure network. I do not know about an extremely secure network,
but if it is OK to launch a normal JNLP for an
application with a 'main()' from the server, I guess
it should be OK to launch extensions off it - you
might need to set up some tests. -
Searching file from directory located at http path.
Hi All,
I have made the program to search for a file in a directory and its subdirectories. This is working fine when my directory is located on local machine. But if the same directory is placed in HTTP path, the code fails to search a directory. Does anyone has idea how can i connect to site so as to access the directories. I used URL and URLConnection to read and write file to the site, and this is also working fine but when it comes to directories i find no solution. Please help.This works fine if i map http://flash/ on my C: and
try to list files in directory C:\Mojo. Can you please
tell how can i know whether the http server i am
trying to access allows directory listing or not.
Because if it does not i have administrator rights on
the server and i can make the changes required.You can see if your Web server allows directory listing by simply
typing in the URL you want to examine, inside your browser, and see if
it shows you a directory listing. For instance, if you type in:
http://flash/Mojo/
in your browser's address bar, and you see a list of files in that
directory, then your Web server supports directory listing.
Note, though, that you can't use the File list() method to get a list of files.
You'll have to make a connection, read the input stream, and then parse
the filenames out of the HTML that the Web server returns. (You can see
what the HTML looks like, by doing View Source inside your brower. That's
what you'll get back from your Java program.)
--Steve -
Delete file from original location and when copied size of file increases.
hi !
I have 2 exe's both of 1.15MB which I want to move to another folder. The files are copied to the folder but the size of exe increases to around 350MB each. What can be the problem ?
BufferedOutputStream bos=new BufferedOutputStream(new FileOutputStream(filename));
int o=bis.read();
do{bos.write(o);}while (o!=-1);
boolean del=this.fpara.delete();
System.out.println(del); Also, the file is not deleted from the original location even though I have used the delete function. The last line produces null output.And do follow coding conventions
{color:0000ff}http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html{color}
If your original source is all jammed up like the snippet you posted, I'm not surprosed that you can't spot your mistakes.
db
Edited by: Darryl.Burke on Mar 9, 2008 12:40 AM -
HOw to delete files from remote server?
Hi,
I want to delete files from a directory on remote server.
I use the following command to delete on current server:
find $srcdir -mtime +90 -name "COR*.txt" -exec rm -f {} \;
Now, how can I delete files from remote server ?
Thanks!
YoginiSome possible options:
1. There exists SSH implementation for Windows.
2. You can make a workaround. You can setup share for specific/wanted directory.
Then you can mount it on Linux machine and execute command localy and delete files "localy" in mounted directory.
3. You can setup FTP server on Windows machine and do that remotely via FTP commands. -
Delete file from directory which
Hi ,
I want to delete files from a directory in Application server.
I have the file name as fn_13/07/2007.txt
Have a condition that files should be deleted which are less than 10 days.
Is there any function module to do this.
Thanks in Advance.
Regards,
IndhraHello Indhra,
These methods may help ( from CL_GUI_FRONTEND_SERVICES )
<b>DIRECTORY_BROWSE</b> Static Method Public Shows a Directory Selection Window
<b>DIRECTORY_CREATE</b> Static Method Public Creates a Directory in the Client
<b>DIRECTORY_DELETE</b> Static Method Public Deletes a Directory in the Client
<b>DIRECTORY_EXIST</b> Static Method Public Checks if a directory exists
<b>DIRECTORY_GET_CURRENT</b> Static Method Public Returns the Current Directory
<b>DIRECTORY_LIST_FILES</b> Static Method Public Lists Files in a Given Directory
<b>DIRECTORY_SET_CURRENT</b> Static Method Public Sets the Current Directory (Do NOT Use)
<b>ENVIRONMENT_GET_VARIABLE</b> Static Method Public Gets an Environment Variable
<b>ENVIRONMENT_SET_VARIABLE</b> Static Method Public Sets an Environment Variable
<b>EXECUTE</b> Static Method Public Starts an Application or Opens a Document in the Client
<b>FILE_COPY</b> Static Method Public Copies a File
<b>FILE_DELETE</b> Static Method Public Deletes a File -
Process Chain - Delete File from Application Server
Hi Gurus,
Im working with Process chain, and i have a load from a flat file, so my question is :
How can i delete that file from the application server after was loaded ?
THANKS IN ADVANCED !!! I REALLY APRECCIATE YOUR HELP.
Marcoshi,
I have gone through the forum you have posted for deleting files from application server through process chain.
I have similar reuirement in my project.
Can you please provide me the solution?
Your inputs will be highly appreciated.
Thanks in advance.
Regards,
Lavanya. -
Deleting file from application server
can any one tell me how to delete file from application server?
Hi,
Use statement
delete dataset 'tmpfile.txt'.
\tmp\file.txt is the file path on application server which you want to delete.
Regards
Sailaja. -
T-code for delete file from application server
Hi all!
Please, has any t-code for delete file from application server? For upload exist CG3Z, for download has CG3Y. And for delete? Has anyone?
I need to delete file from application server in QA system and i don't want to create a program for this because i will need to transport a request from DEV to QA.I don't have contact with basis team.
The FM EPS_DELETE_FILE support directory name with max 60 char. My dir. has more than that. I need a transaction for this.
Anybody know if this transaction exist? -
How to delete file from Window server
Hi
Can anybody tell me that Is there any function module for deleting file from presentation server like C directory.
Quick suggestion will highly be appreciated!!!!!!!Try this:
CALL METHOD cl_gui_frontend_services=>file_delete
EXPORTING
filename =
changing
rc =
EXCEPTIONS
FILE_DELETE_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
FILE_NOT_FOUND = 4
ACCESS_DENIED = 5
UNKNOWN_ERROR = 6
NOT_SUPPORTED_BY_GUI = 7
WRONG_PARAMETER = 8
others = 9
this is pretty gud approach .
Message was edited by:
Nishant Rustagi -
Windows Server 2012 R2 RDS: RDS Users are unable to delete files from their desktop
Hello,
We are working with Windows Server 2012 R2 RDS. We also implemented User Profile Disks. This is all working fine without problems. The only issue I have is that normal users are unable to delete files from their desktop. They are getting a message:
you'll need administrator permission to delete this file, with the prompt for administrator access.
They can edit, copy, rename, cut and paste files. But they cannot delete a file from their desktop.
I checked the security permissions of the files on the desktop (for example a normal self-created PDF file) and the users are owner and have "Full Control" over the files.
I checked the file permissions and took a look under "Advanced", selecting the specific domain user and checked the "Advanced Permissions" and the user has the "Delete" option checked. So he should be able to delete the
file.
I am guessing this is UPD related issue, or something in GPO. But I already unlinked the GPO objects, that I felt could be the source of this problem, but without results.
Could someone give me a hint on where to look? It's kinda annoying to users, that they can't delete their own files.Hello Bria,
What you should check first, is the NTFS permissions on the User Profile Disk to begin with. See if the user has full control over the items that are in the UPD.
Also check the GPO's that are enabled for the user and computer account. You can check that by running: gpresult /h <path>\gpresult.html
There are two GPO settings that could prevent the user from deleting his/her own items:
User
Configuration\\Policies\\Administrative Templates\\Windows Components\\Windows Explorer\
Hide these specified drives in My Computer
Prevent access to specified drives in My
Computer
There might be other GPO settings, that block deleting items on the UPD, but can't think of any out of my head.
I can only think NTFS and GPO settings that might prevent the user from deleting items. In my case it was a GPO setting, that I didn't suspect. -
I am new to mac. just purchaased it 3 weeks ag along with MS office for mac, i notice that all my outlook email are in this finder folder, can i delete these email files from this location? why are they there anyway?
Cherry63 wrote:
I am talking about the icon on the docking row, that's the guy with the smily face. When you click on him it brings up a bunch of files of what I seem to have store/created on my Imac. There are hundreds of emails and some other documents. I tried to delete a few of them when I first got the MS office but it did not like that, it said it have to rebuild oulook. Why cant i delete these files? is this Apple version of Window outlook PST files?
These file extenssions are listed as
olk14_message or even or ccontact. I wish I could send a screen print but I dont see that on the key board. Maybe I should have stuck with windows..
Oh the ...olk14_message's. Do not delete them behind Outlooks back, i.e., from the finder. Those are the various messages that you sent, received, or deleted in Outlook. They are indexed by Outlook so if you delete behind Outlook's back Outlook will get confused trying to access those messages.
You can delete them however using Outlook itself. In outlook select a mailbox (Drafts, Sent Items, Deleted Items, etc.) by clicking on the mailbox on the left. It will show you the messages in that mailbox. You can now select all or selected items in that mailbox. The click the Edit menu and select Delete. You will get a dialog asking if you really want to delete the selections. Answer "Delete" and the messages will get deleted.
The olk14_message's you are seeing are the actual messages shown the Outlook mail boxes. When you actually delete them the way I just described the corresponding olk14_message files will also be deleted.
Note Outlook's Deleted Items mailbox is where all deleted messages go when you click the Delete tool in the Outlook toolbar. Thus using the Delete tool from the toolbar does not permanently delete the messages. So if you been using that for months or years you are going to have a very large Deleted Items mailbox. And every one of those items in there is going to have a corresponding olk14_message file for that message.
So if those olk14_message files you are seeing are from the Deleted Items mailbox you can get rid of all those corresponding olk14_message files by selecting all the messages in Deleted Items and using the Edit menu's Delete.
Alternative ways to the Edit/Delete to do the permanent delete is select (all) the messages to delete and control (right) click to bring up the Outlook contextual menu and select Delete from it.
Finally if you use the Delete tool in the toolbar for messages selected in the Deleted Items mailbox you will be able to permanently delete those too. It's an exception since using the tool on the Deleted Items means there's no place to put those messages except to "oblivion".
So, in summary, using the Delete tool in the toolbar on messages in every mailbox except the Deleted Items mailbox just moves messages to the Deleted Items mailbox. But using the Delete tool on items in them Deleted Items mailbox permanently deletes the selected items in there. And only permanently deleting items removes the corresponding actual ...olk14_message files. -
How to display a dynamic image file from url?
Hey,I want to display a dynamic image file from url in applet.For example,a jpg file which from one video camera server,store one frame pictur for ever.My java file looks like here:
//PlayJpg.java:
import java.awt.*;
import java.applet.*;
import java.net.*;
public class PlayJpg extends Applet implements Runnable {
public static void main(String args[]) {
Frame F=new Frame("My Applet/Application Window");
F.setSize(480, 240);
PlayJpg A = new PlayJpg();
F.add(A);
A.start(); // Web browser calls start() automatically
// A.init(); - we skip calling it this time
// because it contains only Applet specific tasks.
F.setVisible(true);
Thread count = null;
String urlStr = null;
int sleepTime = 0;
Image image = null;
// called only for an applet - unless called explicitely by an appliaction
public void init() {
sleepTime = Integer.parseInt(getParameter("refreshTime"));
urlStr = getParameter("jpgFile");
// called only for an applet - unless called explicitely by an appliaction
public void start() {
count=(new Thread(this));
count.start();
// called only for applet when the browser leaves the web page
public void stop() {
count=null;
public void paint(Graphics g) {
try{
URL location=new URL(urlStr);
image = getToolkit().getImage(location);
}catch (MalformedURLException mue) {
showStatus (mue.toString());
}catch(Exception e){
System.out.println("Sorry. System Caught Exception in paint().");
System.out.println("e.getMessage():" + e.getMessage());
System.out.println("e.toString():" + e.toString());
System.out.println("e.printStackTrace():" );
e.printStackTrace();
if (image!=null) g.drawImage(image,1,1,320,240,this);
// called each time the display needs to be repainted
public void run() {
while (count==Thread.currentThread()) {
try {
Thread.currentThread().sleep(sleepTime*1000);
} catch(Exception e) {}
repaint(); // forces update of the screen
// end of PlayJpg.java
My Html file looks like here:
<html>
<applet code="PlayJpg.class" width=320 height=240>
<param name=jpgFile value="http://Localhost/playjpg/snapshot0.jpg">
<param name=refreshTime value="1">
</applet>
</html>
I only get the first frame picture for ever by my html.But the jpg file is dynamic.
Why?
Can you help me?
Thanks.
JoeHi,
Add this line inside your run() method, right before your call to repaint():
if (image != null) {image.flush();}Hope this helps,
Kurt. -
Read file from URL and save to FTP
Hi,
I have worked in java few years back, now I am out of touch. My friend asked me to create an applet program for him which he can use to download a file from remote location to his ftp server.
For e.g.
File
http://www.demo.com/filename.avi
Saved to
ftp://username:password@ftpsite_address/foldername
I was searching for the classes which I can use to achieve this functionality.
To save to FTP
URL url = new URL("ftp://username:[email protected]/folder/filename");
URLConnection urlconnection = url.openConnection();
long l = urlconnection.getContentLength();
OutputStream outputstream = null;
outputstream = urlconnection.getOutputStream();Using the above code I can get the outputstream to which I can write.
I am now stuck here, have some doubts.
What all classes should I use to read a file like
http://www.demo.com/filename.avi
I know I can use URL to open connection to URLS and then streams to read the url.
I am interested in knowing the class which I should use to read any type of file. File can be zip/avi/rar or anything else.
What all method of the class should I use to read the file which will support all type of files.
Which classes should I use to write the files. The files are going to be huge in terms of size.
I have searched everywhere but every place different classes are used.
Any help is appreciated.Ok now I have started coding but facing a problem.
[PHP]try {
URL url = new URL("http://url_to_file/test.txt");
URLConnection urlconnection = url.openConnection();
long l = urlconnection.getContentLength();
fTextArea.append("Content Length = " + l);
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String line;
while ((line = in.readLine()) != null)
fTextArea.append("\n"+line);
in.close();
} catch (Exception e) {
fTextArea.append(e);
return;
[PHP]
When I run this code locally it works fine but when run in browser it shows security exception
java.security.AccessControlException: access denied (java.net.SocketPermission site:80 connect,resolve)
What should I do to resolve this error. Sorry for being such a noob but do not have much info about this. -
How to play .wav file from URL in web browser embed
Hi;
I want to play a .wav sound file in embed default media player in IE. Sound file is on some HTTP location. I am unable to sound it in that player.
Following is the code.
URL url = new URL("http://www.concidel.com/upload/myfile.wav");
URLConnection urlc = url.openConnection();
InputStream is = (InputStream)urlc.getInputStream();
fileBytes = new byte[is.available()];
while (is.read(fileBytes,0,fileBytes.length)!=-1){}
BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());
out.write(fileBytes);Here is embed code of HTML.
<embed src="CallStatesTreeAction.do?ivrCallId=${requestScope.vo.callId}&agentId=${requestScope.vo.agentId}" type="application/x-mplayer2" autostart="0" playcount="1" style="width: 40%; height: 45" />1. If I write in FileOutputStream then it plays well
2. If I replace my code of getting file from URL to my local hard disk. then it also works fine.
I don't know why I am unable to play file from HTTP. And why it plays well from local hard disk.
Please help.You'll have to ask the devleopers of sencha and phonegap.
Maybe you are looking for
-
How do I get past question mark on macbook (mid 2007)?
Hello, I am trying to fix a Macbook 13" (mid 2007) for a friend. I believe the hard drive (120gb 5400rpm) had failed because I could hear the read/write heads clicking. It was also displaying a flashing folder with a question mark. I installed a
-
I am using Oracle CEP 10g on WIndows. I wrote the following code on CEP: OracleDataSource ods = new OracleDataSource(); ods.setURL("jdbc:oracle:thin:scott/[email protected]:1521/orcl"); Connection conn = ods.getConnection(); // Check for the existenc
-
RESTful webservices invocation from OSB.
Can some one please explain the best way to develop the OSB service to invoke the Restful services. 1. Only proxy service is enough to handle the request, no need of business service? 2. when moving the code from one env to other, we use a business s
-
Invoking beautiful widgets from Java Code
Hi experts, I have the code given below which I obtained from www.gigya.com website. If I add the code given below in an html, I can view the widget inside the html as shown in the attached image in [http://docs.google.com/Doc?id=dfzrknk_31gxvz9nd8|h
-
Text to speech not working in Pages
it works in browsers but not in Pages. Suggestions please.