Copy and open files on local filesystem?

Hello,
For a change request, I have a rather tricky requirement. Suppose each user of the application always has a mapped network drive to a server, let's say drive "k:\", pointing to "\\servername\someDirectory\docs". This folder contains a lot of Word (.doc) files. What the customer wants is a button in the application that copies one or more documents from the "k:\" drive to a local folder, and opens them in Word. The reason the files have to be copied to the local file system is that opening them on the server would result in a read-only copy, whereas the users should be able to edit the opened version.
So the user is in the adf application, clicks a button, and then one or more word documents should be opened. These documents should be local copies of the documents in the "k:\" drive. The location where to put the local copies can be easily determined, the path(s?) of the relevant document(s?) on the "k:\" drive is known, and the location of MS Word / Office can also be determined. So I have at my disposal for example following Strings:
tmpDir = "C:\Documents and Settings\<user>\Local Settings\Temp\"
serverDir = "\\servername\someDirectory\docs\"
doc1 = "doc1.doc"
doc2 = "doc2.doc"
doc3 = "doc3.doc"
wordLocation = c:\program files\microsoft office\office10In the current Forms application, there is a button that uses WebUtil to:
<ul>
<li>Creates an empty .bat file on the local file system (eg C:\Documents and Settings\<user>\Local Settings\Temp, determined by the tmpDir String)</li>
<li>In this bat file, there are one ore more copy commands added, to copy the doc files from the server to the local Temp dir:
copy \\servername\someDirectory\docs\doc1.doc C:\Documents and Settings\<user>\Local Settings\Temp
copy \\servername\someDirectory\docs\doc2.doc C:\Documents and Settings\<user>\Local Settings\Temp
copy \\servername\someDirectory\docs\doc3.doc C:\Documents and Settings\<user>\Local Settings\Tempor in other words:
copy serverDir || doc1 tmpDir
copy serverDir || doc2 tmpDir
copy serverDir || doc3 tmpDir</li>
<li>Next, the necessairy commands are added to the .bat file to open Word with the local copies:
cd c:\program files\microsoft office\office10
start WINWORD.EXE C:\Documents and Settings\<user>\Local Settings\Temp\doc1.doc C:\Documents and Settings\<user>\Local Settings\Temp\doc2.doc  C:\Documents and Settings\<user>\Local Settings\Temp\doc3.docor in other words:
cd wordLocation
start WINWORD.EXE  tmpDir || doc1 tmpDir || doc2 tmpDir || doc3</li>
<li>Finally, an exit command is also added to the .bat file and the .bat file is executed on the client through WebUtil.</li>
</ul>
The resulting .bat file that is executed on the client would look like this as a whole:
copy \\servername\someDirectory\docs\doc1.doc C:\Documents and Settings\<user>\Local Settings\Temp
copy \\servername\someDirectory\docs\doc2.doc C:\Documents and Settings\<user>\Local Settings\Temp
copy \\servername\someDirectory\docs\doc3.doc C:\Documents and Settings\<user>\Local Settings\Temp
cd c:\program files\microsoft office\office10
start WINWORD.EXE C:\Documents and Settings\<user>\Local Settings\Temp\doc1.doc C:\Documents and Settings\<user>\Local Settings\Temp\doc2.doc  C:\Documents and Settings\<user>\Local Settings\Temp\doc3.doc
exitAny suggestions on how I can do this in the cleanest possible way in adf 10.1.3? I do realise that this is not something you want to do in a web application, but this is an important requirement for the customer...
Help would be greatly appreciated!
Chris
Edited by: Chris Schryvers on 17-May-2010 23:55

For now I'm looking into the (signed) Java Applet solution: this should make it possible.
Only one problem: I can't get an applet to run from a jspx (or HTML) page... I keep getting following exception:
load: class applet.view.TestApplet not found.
java.lang.ClassNotFoundException: applet.view.TestApplet
     at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
     at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
     at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://172.22.42.87:8988/TestApplet3-ViewController-context-root/applet/view/TestApplet.class
     at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
     at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
     at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     ... 7 more
Exception: java.lang.ClassNotFoundException: applet.view.TestAppletEven if I do just the basic steps in JDev:
<ul>
<li>Create a new empty Application with a project</li>
<li>Right click project, New..., Web Tier > Applet > Applet</li>
<li>extends: java.applet.Applet, name: TestApplet, package: applet.view</li>
<li>Add "System.out.println("Test");" to the init() method of the applet</li>
<li>Right click project, New..., WebTier > Applet > Applet HTML Page</li>
<li>Accept all defaults, run the Untitled1.html</li>
</ul>
When using the AppletViewer, the applet is executed correctly, but when I try to run it on the Embedded OC4J server, I always get the exception...
Any ideas on how to make this work? Help! :-)

Similar Messages

  • Can't copy and paste files using RDP session in server 2012

    I'm running windows 8, but I have also verified on a windows 7 machine as well. We have server 2012 installed on a machine
    I use remote desktop to get into. I cannot copy files from my local pc and use paste to get them to the server. I could do this with server 2008. Is there some setting I have to change or does this not work with server 2012?
    FYI, clipboard is checked when I open my remote desktop connection window. If I connect into a win server 2008 r2 machine from the same local machine, I can copy and paste files
    just fine.
    - Michael

    Hi,
    I believe RDS clipboard redirection should be enabled by default also on Windows Server 2012. Is there perhaps is a Group Policy Object active that is configured to disable Clip Board Redirection? Either on the computer or the user OU. If not:
    You did not explicitly state this, but I'm assuming that you are running in Application Mode (meaning you did not install the RD Session Host role) ? If so please check the registry on the Windows Server 2012 destination server and look for:
    HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Winstations\RDP-Tcp\fDisableClip
    this should be set to
    0, to make allow Clipboard Redirection
    Also check the key below:
    HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Addins\Clip Redirector
    This should have: 
    Name
    REG_SZRDPClip
    Type
    REG_DWORD0x00000003
    If you did run the RD Session Host role, and you have done so using a Scenario Based Deployment (Scenario
    Based Deployment of RDS in Windows Server 2012 ) you will have a Remote Desktop Management Service GUI available as pat of the Server Manager with which you can enable or disable ClipBoard Redirection from within a GUI on a Session Collection level
    or you can use PowerShell
    Using Powershell to install, configure and maintain RDS in Windows Server 2012
    Kind regards,
    Freek Berson
    The Microsoft Platform
    Twitter
    Linked-in
    Wortell company website

  • How to copy and paste files to Time Capsule

    I thought it could be used as an external disk.
    Do you guys know how to copy and paste files directly into Time Capsule?

    I thought it could be used as an external disk.
    An external disk...also known as a local disk....connects directly to a computer using USB or FireWire.
    The Time Capsule is a network disk, since it connects direct to a network. As such, it s a SHARED network device
    Open a Finder window and look for the SHARED heading on the left side of the window. The Time Capsule icon should appear there. Click on the Time Caspule icon.
    A folder, representing the Time Capsule drive named "Data" (unless you have changed the name of the drive) will appear to the right
    Double click on "Data" to mount the Time Capsule drive on the desktop. You may need to click "Connect As" and enter the Time Capsule device password the first time that you do this.

  • How to copy and paste file in mavericks

    how to copy and paste file in mavericks?

    Spoombung wrote:
    I actually can't get copy and paste to work in Mavericks!!!
    Is it me, or is there something wrong with it? I can hardly believe this was overlooked....
    Obviously it was not overlooked.
    Select a file, go to the edit menu and choose Copy, open another folder and choose Paste from the edit menu.
    What happened (error messages etc)

  • Can't copy and paste files

    Why won't my MacBook Pro let me copy and paste files, particularly from my external hard drives (to each other) and (to my computer). They are both new and it shouldn't be a problem.
    Please help!

    Is it possible that the hard drives, which you said are new, have not been formatted for the mac?  If they are formatted NTFS (which is the standard format for new drives) you will only be able to read from the drives, not write...therefore you will not be able to cut and paste. 
    To check the format of the drive, from the Utilities folder, open the application "Disk Utility".  Select the Hard drive from the left side of that app, and then click on the "Partition" tab.  Then click on the big Partition block found under "Volume Scheme" and see what it says beside "Format".  If it is NTFS, this is your problem.
    The best solution if the drives will only be used on the mac is to use the Disk Utility Application and reformat the hard drives by selecting the drive you want to format on the left side of the app, and select the "Partition" tab.  Under Volume Scheme select "1 partition" and then for format, select "Mac OS Extended (Journaled)".  Then Click Apply.  PLEASE NOTE THAT DOING THIS WILL ERASE EVERYTHING ON THAT HARD DRIVE!!!!
    If the drives need to be used on a windows machine as well, you can download and install this plugin for your mac that will make it read and write to NTFS although it will do so slower than a disk formatted for the mac.  Here is a link: http://www.macupdate.com/app/mac/24481/ntfs-3g    Using this option will NOT require you to loose any data that might already be on the disks.
    Hope this helps!

  • My external hard drive is 'seen' by my iMac and I can go into the Finder and open files and folders. I am using the hard drive for Time Machine back up. However Time Machine says it can't find the drive. Same thing has happened with Final Cut Express.

    My new LaCie external hard drive is 'seen' by my iMac and I can go into the Finder and open files and folders. I am using the hard drive for Time Machine back up. However Time Machine says it can't find the drive.
    The same thing happened recently between Final Cut Express and my other LaCie external hard drive used as the Scratch disk. It fixed itself.
    I've run out of ideas. Help would be very much appreciated. Thanks.

    have you done some searches on FCPx and time machine? Is there a known issue with using a TM drive with FCPx? dunno but ...wait...I'll take 60 sec for you cause I'm just that kind of guy....   google...." fcpx time machine problem"  Frist page link 
    http://www.premiumbeat.com/blog/fcpx-bug-best-practices-for-using-external-hard- drives-and-final-cut-pro-x/
           You cannot have time machine backups on your hard drive if you intend to use it in FCPX.
    booya!

  • I'm not able to copy and paste files from my mac to hard disk and usb. I have tried dragging the items to those devices but it won't work. I also have tried copying and pasting those files onto those devices but that doesn't work too. Can any one help?

    I'm not able to copy and paste files from my mac to hard disk and usb. I have tried dragging the items I want to copy to those devices but it won't work. I also have tried copying and pasting those files onto those devices too but that doesn't work too. Can any one help?

    Hi BobRz
    Thanks for you suggestion but it didn't work - are there other ways for solving this problem? Or is it because my files that I want to copy and paste onto my hard disk etc are too big? (However there is space on my hard disk and it works on a PC)

  • How do I copy and paste files from a windows remote server to my mac?

    How can i copy and paste files from a remote server (windows) to my mac? i have installed cord to connect to the server but now i can´t cpy the files to my mac!

    Hi Sara.  Tanks for responding.  If I cannot figure this out (I  was up
    until 2am last night), I want to cancel my subscription.
    Here are two files you can check on/help me with.  When I try again,  it
    comes up 'an error has occurred when trying to access the service.'
    Please advise.
    Pat Tomassi
    In a message dated 11/1/2014 12:55:23 A.M. Eastern Daylight Time, 
    [email protected] writes:
    How  do I copy and paste text from a converted Word document?
    created by Sara.Forsberg (https://forums.adobe.com/people/Sara.Forsberg) 
    in Adobe Acrobat.com Services - View the full  discussion
    (https://forums.adobe.com/message/6888908#6888908)

  • Why is it no longer Possible to Copy and Paste files from Illustrator CC to Fireworks?

    Why is it no longer Possible to Copy and Paste files from Illustrator CC to Fireworks?

    What do "normal" AI prefs mean? AICB or PDF compliant? You might wanna try to turn off the latter....
    Mylenium

  • Copy and paste files from Windows Explorer

    Hi everybody,
    For a part of my application I need to copy and paste files and folders from Windows explorer to the vi shown in the picture.
    Does anybody know how to implement this with the clipboard functionality.
    Also drag and drop would be very nice (but thats maybe a later step...)
    Best regards, Helmut

    Hello Friedr,
    drag and drop is the easy part!
    Use a path control, this will naturally allow drag and drop. If a file is dropped on this a 'Value Change' event is fired! with this event you can load the data into the picture. To get a nice drag and drop functionality you should make the path transparent and resize to the size of the picture control. This will work fluently!
    To use the clipboard, LV 8 has an functionality for this, I think it is an application event.
    Success Ton
    PS I didn't see you image maybe it was removed when you did a preview these have the bad habit of removing the attachments!
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • How to restrict Cut, Copy and Paste to a Local Clipboard.

    I need to stop any information being copied from my application to other applications such as Word. Is there any way to make sure that all GUI components that support cut, copy and paste use a local clipboard so that I can then control which Flavor's I allow to be cut, copied or pasted?

    What system doesn't allow screen shots? Tell my mobile phone camera that it mustn't take a pic of the screen.
    Anyway, I'd mess with KeyListeners or KeyBindings and suppress STRG+C where you don't want to allow copying. I have never done this, but that would be my first approach.

  • I can't copy and paste files in finder arrrgghh

    Ok im not the most tech savvy person around and this is my first imac, I dont operate windows on it and am stumped. I am trying to transfer my movies onto a media player and external hard drive but it just wont do it. when I just had my previous pc all I had to do was copy and paste and am ready to scream. Does anyone have any answers????

    I don't think this is necessarily a disk format problem.  I've been noticing the same thing the past few weeks.  I used to copy and paste files frequently using the Finder but it no longer works.  I have the Copy option in the contextual menu when a file is selected but I no longer have a Paste option after doing the copy.
    All mounted drives on my system are formatted Mac OS Extended and the operation fails even when attempting to copy files residing on the boot drive to another folder on the same boot drive.  Digging around for a cause/solution now.
    UPDATE:
    The problem in my case was an application called Clipboard Cleaner that strips all formatting from text you copy to the clipboard so you can copy from something like a Word doc and paste into an email without all the Word formatting coming along as well.  It runs in the background and apparently disables the ability to copy/paste files.
    Message was edited by: jdubfromtx

  • Copy and open Command in Oracle 10g Linux (Minut, Ubuntu)

    Dear All;
    I am facing one problem we used to copy any document and for open any document in WINDOWS
    Host('CMD /C COPY '||'"'||:Old_Doc||'"'||' X:\03\03\'||:New_Doc);
    Client_Host('Cmd /C Start '||'X:\03\03\'||:New_Doc);
    But these commands not running in Linux. Please provide me any solution that will help me to copy and open any kind of document in oracle 10g in Linux. I am waiting of your positive response. thx.

    I am not using any thing istead of HOST command, I dn't know any thing similier about HOST command. When I run this in Linux then it give me error message. I think there is something like HOST command in Linux but........ is it??

  • Copying and Pasting file paths in iChat

    Hi all,
    Since upgrading some of our machines at the office to Snow Leopard 10.6.4 and iChat 5.0.3 we are having a strange issue that I hope someone has some insight into.
    When all of the machines at our office ran Leopard and iChat 4, we used to send linkable file paths to folders on our server to one another via iChat so we could avoid having to write "go to Jobs, then to Current, then Posted, and the file is in there."
    We would achieve this by opening up a firefox window, then dragging a folder from our server into the window. It would generate a filepath that looked like "file:///Volumes/Server/Jobs/New/transfer/" in the URL bar which could be copied and pasted into iChat and would appear as a linkable URL. Then we started using a program called Get File Path by Alpha Omega Software (http://alphaomega.software.free.fr/), a great drag and drop app which did the same thing with great results.
    On machines that run Snow Leopard 10.6.4 and iChat 5.0.3 neither of these tricks will work anymore. The message returns an alert saying that the message couldn't be delivered, and that an "AIM service error occurred."
    Does anyone know why this is happening? Has ichat changed the way it pastes text into message windows? These tricks were real timesavers, and it is annoying they are no longer working.
    As an aside, the port number in iChat is 5190 on all machines, those that work and those that don't. This probably has nothing to do with it, but it is a little extra info.
    Thanks in advance,
    Adrian

    Hi,
    I did test this (I got distracted from looking for the thread to post to it).
    I tested with A Google ID and a Jabber ID (one on Each computer) and could send the Text and it appeared as a Live link and showed where the file was.
    It did not matter which was sending (10.6.4 or 10.5.8)
    I tested with two AIM based Logins.
    As you have stated 10.6.4/iChat 5.0.3 will not send to 10.5.8/iChat 4.0.9
    10.5.8/iChat 4.0.9 can send to 10.6.4/iChat 5.0.3
    I double checked firewalls. (Both allowing iChat)
    I checked the router (allowing all ports on Local Traffic).
    I did find this in a Console Message (on the 10.6.4 computer) though:-
    Based on this info I tried deleting com.apple.ichatAgent.plist and starting iChatAgent (I used Force Quit in Activity Monitor and restarted iChat)
    This did not improve things.
    I have sent Feedback
    9:00 PM Monday; November 1, 2010
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

  • C# Script to copy an Excel File working locally but not on the server when I schedule a job

    So I have these couple C# commands to copy an Excel File which works fine and dandy on my local client when I test and run this SSIS Package but when I tried scheduling the job on the server, it failed.
    These are the couple C# commands...
    // This Opens the Source .xlsx File from Emdeon ePaySmart
    Workbook workbook = excelApplication.Workbooks.Open(StringSourceFile, XlUpdateLinks.xlUpdateLinksNever, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
    // This will Save the Source .xlsx Emdeon ePaySmart File as a .xls File...note xlFileFormat.xlExcel5
    workbook.SaveAs(StringDestinationFile, XlFileFormat.xlExcel8, Type.Missing, Type.Missing, Type.Missing, Type.Missing, XlSaveAsAccessMode.xlExclusive, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
    Is this because I'm using xlFileFormat.xlExcel8 and locally it is running fine but when I schedule via SQL Server Management Studio as a SQL Server Agent Job it seems to be failing??
    I sure hope I don't have to change this so it will run as a SQL Server Agent Job and/or run this locally every blessed week.
    Can someone clear this up for me and provide a potential solution?
    Thanks for your review and am hopeful for a reply.
    ITBobbyP85

    That is Excel automation, which requires Excel to be installed on the computer where the code runs, and is not supported on a server without an interactive user logged in.
    David
    David http://blogs.msdn.com/b/dbrowne/

Maybe you are looking for

  • Can't run flash player in full screen on 2nd monitor

    Hi all! I have a laptop with dual video displays. The main display is the laptop's LCD and the 2nd display is a 19" LCD connected via VGA cable. I want to let a Flash movie loop endlessly on the second monitor while I continue to work on the laptop.

  • Paste in browse tab

    When I select one of the browse tabs for a piece of code and try to paste into the page (like in a text area), the paste may work depending on browser type (worked in IE tab, not firefox tab) but it also pastes in the source.

  • MIRO - Transaction saved but not processed

    Hello, I have problem with MIRO : Invoices are saved but after few minuts a message indicates that there are not processed. What can be the reson please ? Thanks

  • Application windows occasionally disappear and cannot be made visible

    Occasionally, all windows, including toolbars, sidebars, etc. will disappear in an application. The files remain open, and sometimes (but not all the time) the top menu will list the menu options for the affected application. Sometimes (but not alway

  • Cs5 upgrade to cs6,  problem with upgrade disc

    I am trying to install cs6 upgrade to presently installed cs5. Cannot proceed, upgrade steps stops with instruction to remove cs4 bridge. I cannot find path to remove cs4 bridge.