How to delete file from client machine

Hi all,
we are using the DataBase: oracle:10g,
and forms/reports 10g(developer suite 10g-10.1.2.2).
can anybody help me how to delete the file from client machine in specified location using webutil or any
(i tried with webutil_host & client_host but it is working for application server only)
thank you.

hi
check this not tested.
PROCEDURE OPEN_FILE (V_ID_DOC IN VARCHAR2)
IS
-- Open a stored document --
LC$Cmd Varchar2(1280) ;
LC$Nom Varchar2(1000) ;
LC$Fic Varchar2(1280);
LC$Path Varchar2(1280);
LC$Sep Varchar2(1) ;
LN$But Pls_Integer ;
LB$Ok Boolean ;
-- Current Process ID --
ret WEBUTIL_HOST.PROCESS_ID ;
V_FICHERO VARCHAR2(500);
COMILLA VARCHAR2(4) := '''';
BOTON NUMBER;
MODO VARCHAR2(50);
URL VARCHAR2(500);
Begin
V_FICHERO := V_ID_DOC;
LC$Sep := '\';--WEBUTIL_FILE.Get_File_Separator ; -- 10g
LC$Nom := V_FICHERO;--Substr( V_FICHERO, instr( V_FICHERO, LC$Sep, -1 ) + 1, 100 ) ;
--LC$Path := CLIENT_WIN_API_ENVIRONMENT.Get_Temp_Directory ;
LC$Path := 'C:';
LC$Fic := LC$Path || LC$Sep || LC$Nom ;
If Not webutil_file_transfer.DB_To_Client
LC$Fic,
'TABLE_NAME',
'ITEM_NAME',
'WHERE'
) Then
Raise Form_trigger_Failure ;
End if ;
LC$Cmd := 'cmd /c start "" /MAX /WAIT "' || LC$Fic || '"' ;
Ret := WEBUTIL_HOST.blocking( LC$Cmd ) ;
LN$But := WEBUTIL_HOST.Get_return_Code( Ret ) ;
If LN$But 0 Then
Set_Alert_Property( 'ALER_STOP_1', TITLE, 'Host() command' ) ;
Set_Alert_Property( 'ALER_STOP_1', ALERT_MESSAGE_TEXT, 'Host() command error : ' || To_Char( LN$But ) ) ;
LN$But := Show_Alert( 'ALER_STOP_1' ) ;
LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
Raise Form_Trigger_Failure ;
End if ;
If Not webutil_file_transfer.Client_To_DB
LC$Fic,
'TABLE_NAME',
'ITEM_NAME',
'WHERE'
) Then
NULL;
Else
Commit ;
End if ;
LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
Exception
When Form_Trigger_Failure Then
Raise ;
End ;sarah

Similar Messages

  • How to upload file from client machine to  database in server machine?

    I am developing a web application. this application is suppose to take file from client machine and store that to database in the server side.
    My jsp form is of multi part type. but I am confused about what to write in servlet.
    Can any one help me ?
    Edited by: chinmaya_mishra on Feb 16, 2009 2:55 AM
    Edited by: chinmaya_mishra on Feb 16, 2009 2:58 AM

    http://www.google.com/search?q=jdbc+blob
    Blob processing varies between databases; see also examples for whatever database you are using, e.g.
    http://www.google.com/search?q=jdbc+blob+oracle
    If you are storing text data instead of binary data, replace "blob" by "clob" in the searches.

  • How to delete files from time machine volume

    Before selling my old MacBook Pro, I had backed up all my data on to an external WD hard drive using Time Machine. I had since switched to a desktop but since I did not have any need for the MacBook Pro files at the time, I had put aside that WD hard drive. Recently, I wanted to clear some space on that external drive to make way for some of my present files. I drilled down in to Backups.backupdb and tried to delete files, but was met with the error "
    An error occurred.The operation couldn’t be completed. (OSStatus error -5000.) Insufficient access privileges for operation".
    It did prompt me for a username and password before showing that message. I tried both my current user/pass as well as (what I remember to be) my old user/pass on the MacBook Pro. Both presented me with the same error message.
    I also did try to mount the drive as Time Machine on my present system, and then try to enter Time Machine and delete it from there. However, clicking on "Enter Time Machine ... " does nothing.
    Any ideas?

    Hi Linc,
    my back-up data is managed by Time Machine; the actual data is on a second internal Hard Drive with a capacity of 1TB - not partitioned. I am using Time Machine and have access to all data backed up since Mavericks Clean Install but not the data prior to this date.
    When I open the 1TB drive in Finder I can see a folder "Backups.backupdb/Sigi's Mac Pro/ followed by many folders of backup dates going back to 2010-09-20-103441 and up to 2014-02-07-142414 all followed with folder Macintosh HD.  February 7th  2014 was the date of the clean install.
    These Backups are followed by backup date folder 2014-02-08-075554 with a subfolder of MacPro-320GB (this is the name I assigned to my Boot Drive during formatting; I suspect I should have assigned the same name as before ie. Macintosh HD) and 2014-02-11 with a subfolder Macintosh HD, these are the ones I get access to by way of Time Machine > Restore.
    Weird thing is on Febr 11 when I relised my possible mistake and renamed the Bootdrive back to what it was initially ie. Macintosh HD despite this I have access to all backup data since the Clean Install in both folders MacPro-320GB as well as Macintosh HD but not to any data prior to the Clean Install.
    Is there something that Time Machine knows and prevents access or is it simply a matter of renaming the subfolder 2014-02-08-07554/MacPro-320GB to ........./Macintosh HD?
    I like to restore selectively and not everything - It was hard work reinstalling apps that were supposed to be the troublemakers (ref my discussion on Maverick problems) but I now need to get onto data specific to some of these apps as well as other data I may have missed. Long story? Yes and sorry.
    Sigi

  • How to upload file from client machine to  server machine?

    i am developing one web application.I have one html file with browse option. client can browse any type of file. what ever file the client will browse it going to be stored in server machine. for storing the file want to use servlet. my html form is of multipart type.
    can any one send me the servlet code? i am using tomcat 5.5 as web server.

    [http://commons.apache.org/fileupload]
    Start reading 'User Guide' and 'Frequently Asked Questions'.
    Good luck :)

  • How do you delete file from time machine back up?

    How do you delete file from time machine back up?

    This from Apple KB Article  If Time Machine is not in your Dock, you can enter Time Machine from the Menu Bar or System Preferences.
    Deleting data from a Time Machine backup
    To delete all backups of one or more items from a Time Machine backup, follow these steps:
    Click the Time Machine icon on your Dock to enter the Time Machine restore interface.
    Click on the item you would like to delete. Command-click to select multiple items.
    Control-click (or right click) the highlighted item(s) and select "Delete All Backups of..." from the contextual menu, or select "Delete all backups of..." from the Action Item menu.
    Authenticate with an administrator password when prompted.

  • How to find out a file from client machine

    hi all,
    I want to read a file from client machine, like a outlook express file in which all the address are saved, using servlet. Initially i do not know the file path for that file, How i can read that file.
    plz help me
    thanx in advace
    Manish

    You have 2 possibilities. First, you might be able to mount the client's disk drive at the server; the servlet can then access that drive directly. Second, install a client program on the client machine and communicate with that program, and have it do the search (or whatever).
    Outside of Java, there are remote-access programs - like PCAnyWhere.

  • Is it possible to delete files from time machine?

    Is it possible to delete files from time machine? I had a drive crash, restored the files to a new drive, and now the old versions and the new versions of the files are both backed up, taking up a mountain of drive space. Do I just have to wait 'til the drive gets full and then tell it what to delete first?

    Hi, I need help in a related problem. I have 500gb time capsule. I needed larger hard drive, so I now use TM to back up to a different 1tb hard drive. So I don't need the TC as a TM back up device. But I want to use the TC's hard drive as an extra external hard drive. I deleted the files that were on it. but it still shows it has a sparsebundle file with a size of over 400gb ( probably the size of the old backups). When I use disk utility to try to erase it, I am not offered the erase tab. This "disk" does show on the desk top as a mounted disk (I think) with only 53 gb free. How can I set this up so all the disk space is free and I can use it for storing files, not as a back up? Thanks

  • JSP to Upload file from client machine to Web Server!

    Hi,
    I want to upload a file from client machine to web server in order to send it as email attachment, How can I do it? After uploading the file the class should give me the path where the file is stored on the web server and the file name in return!
    I know the HTML <file> field but dont know how to copy it on web server, HTML Part will be:
    <FORM ENCTYPE="multipart/form-data"
    method="POST" action="My.jsp">
    <INPUT TYPE="file" NAME="mptest">
    <INPUT TYPE="submit" VALUE="upload">
    </FORM>
    Please help!
    Thanks,
    - Rahul

    You can use cos.jar provided by O'Reilly from http://www.servlets.com/cos/. Take a look at com.oreilly.servlet.multipart.* classes.
    Package is provided with source, classes, documentation and, of course, ready-to-use jar file.
    It is really usefull and - ready!

  • Reading Large data files from client machine ( urgent)

    Hi,
    I want to know the best way for reading large data at about 75MB file from client machine and insert to the database.
    Can anybody provide sample code for it.
    Loading the file should be done at client machine and inserting into the database should be done at server side.
    How should i load the file?
    How should i transfer this file or data to server ?
    How should i insert into the database ?
    Thanks in advance.
    regards
    Kalyan

    Like I said before you should be using your application server to serve files >from the server off the filesystem. The database should not store files this big >and should instead just have a reference to this file. I think u have not understood the problem corectly.
    I will make it clear.
    The requirement is as follows.
    This is a j2ee based application.
    Application server is oracle application server.
    Database is oracle9i
    it is thick client (swing based application)
    User enters datasource like c:\turkey.data
    This turkey.data file contains data
    1@1@20050131@1@4306286000113@D00@32000002005511069941@@P@10@0@1@0@0@0@DK@70059420@4330654016574@1@51881100@51881100@@99@D@40235@0@0@1@430441800000000@@11@D@42389@20050201@28483@15@@@[email protected]@@20050208@20050307@0@@@@@@@@@0@@0@0@0@430443400000800@0@0@@0@@@29@0@@@EUR
    like wise we may have more than 3 lacs rows in it.
    We need to read this file and transfer this to the application server. Which are EJBS.
    There we read this file each row in file is one row in the database for a table.
    Like wise we need to insert 3 lacs records in the database.
    We can use Jdbc to insert the data which is not a problem.
    Only problem is how to transfer this data to server.
    I can do it in one way. This is only a example
    I can read all the data in StringBuffer and pass to server.
    There again i get the data from StringBuffer and insert into database using jdbc.
    This way if u do it. It is performance issue and takes long time to insert into the database.It even may give MemoryOutofBond exception.
    just iam looking for the better way of doing this which may get good performace issue.
    Hope u have understood the problem.

  • HOW TO DELETE FILES FROM ADOBE READER IF THEY ARE UNNECESSARY

    HOW TO DELETE FILES FROM ADOBE READER IF THEY ARE UNNECESSARY

    Hi,
    You might need to sign up at https://cloud.acrobat.com/ and choose 'Files' tab where you can find all the files.
    Select all the files you want to remove and choose 'Delete' option.
    Regards,
    Anubha

  • How to restore files from Time Machine after Clean Install of Mavericks

    How to restore files from Time Machine after Clean Install of Mavericks. I know the data is there but seems unaccessable because I may have changed the Computer or Owner name. Is there any way to fix that now?

    Hi Linc,
    my back-up data is managed by Time Machine; the actual data is on a second internal Hard Drive with a capacity of 1TB - not partitioned. I am using Time Machine and have access to all data backed up since Mavericks Clean Install but not the data prior to this date.
    When I open the 1TB drive in Finder I can see a folder "Backups.backupdb/Sigi's Mac Pro/ followed by many folders of backup dates going back to 2010-09-20-103441 and up to 2014-02-07-142414 all followed with folder Macintosh HD.  February 7th  2014 was the date of the clean install.
    These Backups are followed by backup date folder 2014-02-08-075554 with a subfolder of MacPro-320GB (this is the name I assigned to my Boot Drive during formatting; I suspect I should have assigned the same name as before ie. Macintosh HD) and 2014-02-11 with a subfolder Macintosh HD, these are the ones I get access to by way of Time Machine > Restore.
    Weird thing is on Febr 11 when I relised my possible mistake and renamed the Bootdrive back to what it was initially ie. Macintosh HD despite this I have access to all backup data since the Clean Install in both folders MacPro-320GB as well as Macintosh HD but not to any data prior to the Clean Install.
    Is there something that Time Machine knows and prevents access or is it simply a matter of renaming the subfolder 2014-02-08-07554/MacPro-320GB to ........./Macintosh HD?
    I like to restore selectively and not everything - It was hard work reinstalling apps that were supposed to be the troublemakers (ref my discussion on Maverick problems) but I now need to get onto data specific to some of these apps as well as other data I may have missed. Long story? Yes and sorry.
    Sigi

  • How to transfer files from virtual machine to host machine

    Hello, 
    I want to know how to copy files from virtual machine o host machine while the virtual machine running. I can't share files from virtual machine because i am just studying for mcsa in company computer. I can't connect my virtual machine to same network so
    i'm using a different ip range and i created a internal network switch for my virtual machines in hyper-v. Please give me a best solution for my studies.
    Regards,
    Ashane Deshapriya.
    Ashane Deshapriya ( MCP )

    Finally I got the solution...
    Here is how you can share files between a Hyper-V host and any virtual machines running on that host.
    If you've used Microsoft Virtual PC or Microsoft Virtual Server, you'll have enjoyed the fact that you can copy and paste between a virtual machine and those platforms. This doesn’t work with Hyper-V however—you can't copy/paste between a VM and the Hyper-V
    host.
    The workaround is to do the following:
    1. On your Hyper-V host, create a shared folder and assign Change permission to Everyone.
    2. On the virtual machine running on the host, open the Network and Sharing Center and enable File and Printer Sharing.
    3. On the virtual machine, click Start and type \\host_name\share_name where host_name is the name of your Hyper-V host and share_name is the name of the share you created.
    4. Press ENTER and an Explorer window will open in the VM showing the contents of the shared folder on the host.
    5. You can now copy files from the VM to the host and vice versa as needed.
    Regards.
    Ashane Deshapriya ( MCP )

  • How to write files on Client Machine using JSP

    Hi,
    I am new to JSP. Please tell me how do i write files on Client machine thru a Browser.
    Please let me know at the Earliest.
    Thanks.
    Mehul Dave

    1) Well I find it rather convenient to deploy a web app as just one file rather than a bunch of files. For deployment it's much better. However I prefer using expanded files when developping (to use auto reload in Tomcat for example)
    2) It is a bad idea to upload files inside your webapp's context (ie: in it's deployment directory) because one day an uninformed system administrator might come and redeploy the web app and therefore delete all your uploaded files (believe me, I've already experienced this!)
    What i do usually is upload it in a completely different directory, something like /uploaded_files. Your uploaded files are therefore completely independant from your webapp
    However it is a bit trickyer to get those files back. Let's take the example of image uploads. You have 2 ways of proceeding:
    - the easiest : configure your web server (apache etc...) to redirect a certain url to your external directory. For example the /upload url will point to a /uploaded_files directory. This is easier to do and the fastest way to serve images but not always the best solution: you are dependant on the web server's configuration and you can't control the visibility on your files (no security constraints, anyone can see your uploaded files if they know the url).
    - you can also write a servlet which will load the file as an array of bytes and send it back in the response.
    You can call it this way :
    <img src="/serlvets/showmyimage?path=uploaded.gif">
    in this way you can control your uploaded files better: you may want to define security constraints on the visibity or not of uploaded files depending on the user which has logged on the site.

  • To upload a file from client machine to server machine

    Hi everybody!
    Could anyone plz help me. I am struck in a problem
    I want to transfer a file from client's machine to server but I am not able to upload
    It is tranferring the file only to the local machine
    I am using orielley package It is transferring files only to my local machine but not to the server .Can anyone correct it. It's very urgent
    how to write the relative path for server
    I am using this path and it is not uploading
    MultipartRequest multi = new MultipartRequest(request, "../<administrator>:<dev2daask>@dev2:C:/123data/", 5 * 1024 * 1024);
    Here is my code:
    <%@ page import="java.util.*" %>
    <%@ page import="javax.servlet.*" %>
    <%@ page import="javax.servlet.http.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="com.oreilly.servlet.MultipartRequest"%>
    <%
    try {
    // Blindly take it on faith this is a multipart/form-data request
    // Construct a MultipartRequest to help read the information.
    // Pass in the request, a directory to saves files to, and the
    // maximum POST size we should attempt to handle.
    // Here we (rudely) write to the server root and impose 5 Meg limit.
    MultipartRequest multi = new MultipartRequest(request, "../<administrator>:<dev2daask>@dev2:C:/123data/", 5 * 1024 * 1024);
    out.println("<HTML>");
    out.println("<HEAD><TITLE>UploadTest</TITLE></HEAD>");
    out.println("<BODY>");
    out.println("<H1>UploadTest</H1>");
    // Print the parameters we received
    out.println("<H3>Params:</H3>");
    out.println("<PRE>");
    Enumeration params = multi.getParameterNames();
    while (params.hasMoreElements()) {
    String name = (String)params.nextElement();
    String value = multi.getParameter(name);
    out.println(name + " = " + value);
    out.println("</PRE>");
    // Show which files we received
    out.println("<H3>Files:</H3>");
    out.println("<PRE>");
    Enumeration files = multi.getFileNames();
    while (files.hasMoreElements()) {
    String name = (String)files.nextElement();
    String filename = multi.getFilesystemName(name);
    String type = multi.getContentType(name);
    File f = multi.getFile(name);
    out.println("name: " + name);
    out.println("filename: " + filename);
    out.println("type: " + type);
    if (f != null) {
    out.println("length: " + f.length());
    out.println();
    out.println("</PRE>");
    catch (Exception e) {
    out.println("<PRE>");
    out.println("</PRE>");
    out.println("</BODY></HTML>");
    %>

    you have not understood my point
    how does this code will run on servlet when I want to upload a file from client's
    machine to server machine
    what I am doing is I am giving an option to the user that he/she can browse the file and then select any file and finally it's action is post in the jsp form for which I have sent the code
    All the computers are connected in LAN
    So how to upload a file from client's machine to server's machine
    Plz give me a solution

  • 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!
    Yogini

    Some 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.

Maybe you are looking for

  • Button inactive

    Hi guys , I 've a problem in message mapping, the button "Map Selected Fields and Substructures If names are identical" is always in grey , so I can't use it...Does anybody know why?

  • Why won't Photoshop CS5 use available memory before scratch?

    I've given PS CS5 access to 80% of machine memory (about 8.5 out of 12 GB).  Yet, it only seems to use (at most) 3.5 GB of ram, while using 1 or more GB of scratch disk. I had hoped that with lots of memory, I'd avoid using scratch.  Am I misinterpre

  • Do I need to unlock CUDA cores?

    I have Premire CS 5.5 and After Effects CS 5.5.  My windows 7 computer has an Asus ENGTX470 Phys X by NVIDIA GeForce GTX470 video card.  To get the full power avilable to me, do I have to go through a process of unlocking CUDA cores or is that done a

  • Contolling drop down for a field in table controll.

    Can we controll the drop down of a field in a table controll ..which will vary from one row to another. Like for one row that field shud have add, delete in drop down, and for another row it shud hav only replace in the drop down

  • About process programming

    Hi, I was trying to run cvs from a java program using the following code: Process proc = rt.exec("c:\\tools\\wincvs\\cvsnt\\cvs -d :pserver:[email protected]:/var/local/cvshome login"); Now when the command is entered in dos prompt - c:\tools\wincvs\