How to determine if "File in use"
How can I determine if a file is currently being 'used' that would prevent me from copying over the file. I would like to be able to determine who is using this file (win id). As a test i tried the following and got an error as expected:
PS C:\src> move-item -path "main14.fmx" -destination "c:\forms" -force
Move-Item : Cannot create a file when that file already exists.
At line:1 char:10
+ move-item <<<< -path "main14.fmx" -destination "c:\forms" -force
+ CategoryInfo : WriteError: (C:\forms\main14.fmx:FileInfo) [Move-Item], IOException
+ FullyQualifiedErrorId : MoveFileInfoItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand
In my script I would like to know WHO is currently using the file; a "try...catch" scenario would only keep me from completing the copy, but I would want to know who is using the file so that I can call USER and ask him/her to close the file
so that I can copy latest version.
PS C:\> openfiles /?
Note that this is not a support forum for the
openfiles command.
-- Bill Stewart [Bill_Stewart]
Similar Messages
-
How to find the File name using the FTP Adapter
hi all,
how to find the File name using the FTP Adapter with BPEL.
RegardsFound the solution for this.
First In the mediator's routing rule use assign property $in.property.jca.file.FileName to $out.property.jca.file.FileName
In the BPEL's receive activity go to the properties tab and get the property to a BPEL variable. That should do it.
Thanks for the posts -
How to determine the file system on Solaris
Friends,
How to determine which file system I have installed UFS or ZFS on Solaris
ThanksOther methods would include looking at the /etc/vfstab if it's in there or fstyp(1M):
System Administration Commands fstyp(1M)
NAME
fstyp - determine file system type
SYNOPSIS
fstyp [-a | -v] special [:logical-drive] -
How to import WMV file for use in adobe programs, especially After Effects and/or Premier?
I have the latest adobe creative cloud and i'm using Mac 10.8.2
My client gave me a wmv file that she wants some people blurred out in the background but when I go to import the media, it's greyed out. I'm assuming that After Effects will be the best solution for this, but maybe there is another way.
I can purchase a video converter and convert it to .mov but that costs extra money that I don't want to spend just to do this one project. -
How do you disable "FILE IN USE" pop-ups so you can actually edit and delete PDFs?!
Can someone please help me with this query:
How do you disable "FILE IN USE" pop-ups so you can actually edit and delete PDFs?!
I continue to have a pop saying that either the file in open somewhere in the serve- which it is not- and I cannot delete a particular pdf or edit it.
It's incredibly frustrating and in the end I end up having four files with different names because it won't let me edit the original file!!!!Hi Amila1,
Are the pdfs stored on a network location?
If so is the Preview pane turned ON?
Please check the doc: http://kb.globalscape.com/KnowledgebaseArticle10862.aspx
Regards,
Rave -
How to determine which file descriptor opened my driver?
Suppose a user process opens my driver twice. How does open() determine which file descriptor opened the device? In Linux, the kernel will pass a pointer to a structure which represents the open file descriptor. However, Solaris only passes the device number to open(), so I can only determine my device was opened, but not which file. I need this information because my driver needs to keep track of all file descriptors opened for the device.
Thanks!
-DarrenI'm still at a loss why you need to know the file descriptor value (unless the app is sufficiently spaghettied that it has to query the driver to figure out what it opened with what). It's like asking what filename was used to open the device (which you can't get either). Since Solaris is based on a Streams framework, it would be bad to have drivers to even think it has a direct mapping into user space. It would be the same in asking (using /bin/sh):
prog3 4>&1 3>&1 2>&1 | prog2 | prog1
and you want to know from prog1 what descriptor prog3 wrote to. I don't see how linux even does this properly, since any given file open can have multiple file descriptors (via dup). -
How to determine binary file data set size
Hi all
I am writing specific sets of array data to a binary file, appending each time so the file grows by one data set for each write operation. I use the set file position function to make sure that I am at the end of the file each time.
When I read the file, I want to read only the last 25 (or some number) data sets. To do this, I figured on using the set file position function to place the file position to where it was 25 data sets from the end. Easy math, right ? Apparently not.
Well, as I have been collecting file size data as I have started the initial tet run, I am finding the the file size (using file size command and getting number of bytes as a result) that the size is not growing the same amount every time. My size and format of my data being written is identical each time, an array of four double precision numbers.
The increments I get are as follows, after first write - 44 bytes, after 2nd - 52 bytes, 3rd - 52 bytes, 4th 44 bytes, 5th - 52 bytes, 6th - 52 bytes, 7th - 44 bytes and it appears to maintain this pattern going forward.
Why would each write operation not be identical in size of bytes. This means that my basic math for determining the correct file poistion to read only the last 25 data sets will not be simple and if somewhere along the line after I have accumulated hundreds or thousands of data sets, what if the pattern changes.
Any help on why this is occuring or on a method of working around the problem would be much appreciated.
Thanks
Doug
Doug
"My only wish is that I am capable of learning each and every day until my last breath."
Solved!
Go to Solution.I have stripped out the DSC module functions from the vi and attached it here. I also set default values to all the inputs so it will run with no other inputs. I also included my current data files (zipped as I have four of them) though the file names are hard coded in the vi so they can be changed to whatever works locally. In fact probably will have to be to modified for the path anyway.
If you point to a path that has no file, it will create a new one on the first run and the file size will show zero since there is no data in it. It will start to show the changes on each subsequent run.
As I am creating and appending four different files, each with it's own set of data but always the same format (array of four double precision numbers) and the file size information always increments the same for all four files (as will be seen in the File Size Array) I don't think it is a function of the size of the acutal numbers but something idiosyncracy with how the binary file is created.
If this proves to be a major hurdle I guess I could try a TDM file but I already got everything else working with this one and need to move on to other tasks.
Thanks for any continued assistance
Doug
Doug
"My only wish is that I am capable of learning each and every day until my last breath."
Attachments:
!_Data_Analysis_Simple.vi 40 KB
SPC.zip 2 KB -
How to get Bursting file to use the same template as selected by user
I have created an XML publisher bursting control file for a standard Oracle report Direct Debit letter.
The user wants to be able to select from a number of different letter templates which is ok except that the bursting control file is fixed to use one template.
How can I get the bursting control file to use the same letter template as selected by the user when running the report ?
I am using XML Publisher 5.6.3 with bursting patch.Try these following, which come to my mind now as of now.
In the bursting file, you can do the filtering and apply different template..
<xapi:template type="rtf" location="/usr/template1" filter=".//DIRECT_DEBIT[./parameter_or_element='first_template']"></xapi:template>
<xapi:template type="rtf" location="/usr/template2" filter=".//DIRECT_DEBIT[./parameter_or_element='second_template']"></xapi:template>
second option..
you can replace the element from the xml in the bursting control file.
${ELEMENT_NAME}
can be used in the template name i guess..
<xapi:template type="rtf" locale=""
location="xdo://AR.${SHORT_NAME}.en.US/?getSource=true" translation="" filter="">
</xapi:template>
But in this short name has to be in XML file...
I haven;t tried it...wil try it wheni get time.. -
How to determine the purchasing group using BADI BBP_PGRP_FIND
Hello Friends
We use SRM Server 5.5 (Classic scenario).
As you know that, purchasing group has the responsible product categories in PPOMA_BBP, when user creates the shopping cart to determine the purchasing group.
In our case, we should determine the purchasing group using other criteria.
MM side is OK to determine the purchasing group using specific criteria.
Because Material Master has the purch. Group information.
In case of SRM, we should develop the logic using BBP_PGRP_FIND BADI.
But Im not sure how to use this badi.
We want to determine the purchasing group based on the following logic.
If described shopping cart without product ID
Do Standard purchasing group determination logic.
Else
Assign the purch group from MARC- EKGRP (Purchasing Group)
Is it possible to determine above the logic?
If yes, Could you give me some information?
Thank you,
Best regards,
SH
Message was edited by:
So Hee LeeThank you for your answer.
I found the way to develop the our logic using BADI: bbp_pgrp_find.
But Im not sure the following logic is correct.
To differentiate described req. or product id req, We check the E_ITEM PRODUCT using BBP_PD_SC_GETDETAIL.
IF E_ITEM PRODUCT is blank, Read the category ID to find the purchasing group.
To find the purch. Group, we can use FM: BBP_OM_DETERMINE_RESP_PGRP.
Import parameter: IS_RESP_ITEM_DATA Category _ID
Export parameter: ES_PURCH_DATA
ELSE
CALL the customer function to read the R/3 purchasing group from MARC- EKGRP
Search the HRT5500-TABNR using purchasing group from R/3.
Search the HRP5500 OBJID using HRT5500-TABNR
Call the FM: BBP_OM_DETERMINE_RESP_PGRP
Import parameter: IS_RESP_ITEM_DATA PROC_GROUP OBJID
Export parameter: ES_PURCH_DATA
Thank you
Best Regards
SH -
Dear All,
I am trying to use the functionality Transportation and Shipment Scheduling in GATP.
I would like to know that how the sytem determines the process alias using condition technique in Transportation & Shipment Scheudling?
As the Transportation & Shipment Scheduling functionality can be extended further by using the configurable process to overcome the complex scenario. But it needs that process alias should not be determined by using the condition technique.
Moreover, is it possible to use both functionality simultaneously in the system. i.e. Transportation and Shipment Scheduling using condition technique and Transportation and Shipment Scheduling using configurable process?
Thanks & Regards
Piyush RanpuraHi Piyush,
I have added a small overview in the SCN WIKI which shows you the two ways for the process alias determination and also here as attachment:
http://wiki.sdn.sap.com/wiki/display/SCM/Time+and+Scheduling+Functions
Yes, depending on your customizing you can use both scheduling methods in parallel. e.g. you activate CPS just for a specific ITEM category or product and/or customer and/or....what ever you want.
best regards,
Michael -
How to capture JPEG files by using camera
Hi, now I have a problem, I need your help, I am trying to use a camera that capture JPEG files from camera, I have used those related classes(JMF), but I still can not capture any JPEG files from it.
Although there are some examples about the video capture(just for mov or avi files), it does not mention how to capture JPEG files.
Thank you for your help!I have the same problem.
please,help us. -
How to determine the IPS throughput using Cisco ASA 5500 IPS Solution?
Hello there!
I´ve been desinging a solution to protect de Server Farm and I intend to use the ASA 5500 series with AIP-SSM module. There´s any tool to determine the real throughput that I need? I mean, how to determine the performance (Firewall + IPS throughput), what main points I should consinder?If the server farm is running production levels of traffic today you can get statistics off a variety of networking devices passing the existing traffic. Switches, routers and firewalls all count every byte of traffic they pass. There are plenty of tools that can gather this traffic into tables via SNMP too, such as MRTG.
Do not average your traffic over too great a time peroid, you will miss busy hour peaks. At most, use 5 min averages.
- Bob -
How to determine the patch number used (installed using runInstaller)
Whilst it easy to find the patch number installed using opatch by using the lsinventory argument.
Is there a way to find patch number for a patch applied via runInstalled?
META-INF/MANIFEST.MF from platform/iam-platform-kernel.jar,gives the following:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 19.1-b02 (Sun Microsystems Inc.)
Product-Version: 11.1.1.3.0
Build-Number: 11.1.1.3.0.0.0
Built-By: aime1
Build-Tag: Build_11.1_1_3.0_0_0
Built-at: 05/02/2011 06:46
Version: 11.1.1.3.0
Build-Label: IAM_11.1.1.5.0_GENERIC_110502.0500
Build-Transaction: NONE
But I need the exact patch number, eg, p1234567.
Anyone know where to find this information?
The system has been patched from 11.1.1.3 to 11.1.1.5
I am looking for the patches used for WLS, SOA and OIM.
Regards
HanifAnother way to get it is:
SELECT XSD_CODE,XSD_VALUE FROM dev_oim.XSD WHERE xsd_code='XL_ADE_LABEL';
Check Note: 1247564.1 for 11.1.1.3 and 1360009.1 for 11.1.1.5 for builds to patch mapping. Check Note:1299977.1 for how to determine build numbers.
For WLS you can use: http://docs.oracle.com/cd/E13222_01/wls/docs81/admin_ref/clic.html
For OIM as mentioned above
For SOA: $mw_home\Oracle_SOA\bin\soaversion.cmd (or soaversion.sh) to know the SOA version or
SELECT version, status, owner FROM schema_version_registry where owner = 'DEV_SOAINFRA';-Bikash -
How to Determine Text File Encoding is UNICODE
Hi Gurus,
How to determine whether the file is a UNICODE format or not?
I have the file stored as a BLOB column in a table
Thanks,
SombitThat's a rather hard problem. You would, realistically, either have to make a bunch of simplifying assumptions based on the data or you would want to buy a commercial tool that does character set detection.
There are a number of different ways to encode Unicode (UTF-8, UTF-16, UTF-32, USC-2, etc.) and a number of different versions of the Unicode standard. UTF-8 is one of the more common ways to encode Unicode. But it is popular precisely because the first 127 characters (which is the majority of what you'd find in English text) are encoded identically to 7-bit ASCII. Depending on the size and contents of the document, it may not be possible to determine whether the data is encoded in 7-bit ASCII, UTF-8, or one of the various single-byte character sets that are built off of 7-bit ASCII (ISO 8859-15, Windows-1252, ISO 8859-1, etc).
Depending on how many different character sets you are trying to distinguish between, you'd have to look for binary values that are valid in one character set and not in another.
Justin -
How can display svg file by using applet
Hi ,
my problem is ..
1. I have one servlet which is generating svg file by using batik package.
2.There is one Applet which receives SVG file from Servlet ..
From here i dont have dont doubts.. then my doubt is
3. How can display that svg file on the browser..
please help me if u know any ,
thanks regards,
BaluMaybe this page can help you?
http://www.w3c.org/Graphics/SVG/
Maybe you are looking for
-
ICal Shared Exchange Calendar Stopped Working
I have been successfully accessing the Johns Hopkins Exchange servers for mail, address book, and calendar services on my Mac for months. In iCal I had also been accessing a shared Exchange calendar for many months. About 1-2 months ago, I lost acces
-
How to assign status profile to components in service order
Hi, For my business requirement, I want to assign status to individual components planned in the service order. Even though there is a status button on the component tab, there is no config where I can assign the status profile. We can only assign st
-
Photosmart d110 won't scan with Mac OS X 10.9
"HP Scan" utility used to work correctly with my iMac and hp Photosmart d110 printer/scanner. Since updating to Mac OS X 10.9.5, the scanning no longer works. I've downloaded most recent scanner drivers, and installed multiple times. Connection is
-
How to create a parameter to allow multiple selection
Hi, I am developing report in Oracle EBusiness suite. I use concurrent program to develop the report. My question is how to create a parameter to allow multiple selection for such kind of report? thanks Lei
-
I just got my iPhone 5 a month ago and the last time I clicked on updates for a few of my apps, my phone has completely stopped downloading. The apps are stuck at waiting to update, which means they are unavailable for me to use. Plus, my newly downl