Get the file's owner
hi all !
how can i get the file's owner ?
Ask the Finder:
set theFile to (choose file)
tell application "Finder"
set theOwner to owner of theFile
end tell
Similar Messages
-
I cannot get the file download using 1.6
Hi,
I am using HTMLDB v1.6 and I have followed the example to upload and download files. I was able to get the file upload working but I am getting the page cannot be found error message. I am using a package to implement the page download can I do that? The URL I entered when I set the ID files is
#OWNER#.JobManagement.Download_Submitted_File?p_file=#ID#.
The URL Generated when I click on the download link is:
http://aseera:7777/pls/htmldb/BFAYEZ.JobManagement.Download_Submitted_File?p_file=4.
Anyone has any idea why the download is not working?
Thanks,
BasharSergio,
I looked at the log files and I was able to figure out what was wrong. I changed my parameter name to p_job_id for the stored procedure but I used the p_file parameter name from the example. I also switched to use the package instead of the stored procedure and that worked too. The only thing I need to figure out is why the downloaded file name is packagename.ext for the file name.
Thanks,
Bashar -
File Adapter - how to get the file count from a folder
Hi All,
I have a requirement that have to poll a directory when the file count is reached to number N (ex:number of files avilable in folder is 5) otherwise it should wait and not pick any of the files. Is it possible to get the file count from a folder using file adapter ?? otherwise please suggest me an approach to achieve this requirement.
Thanks,
JJHi Sarath,
Thank you for your reply.
Go with the list files operation of file adapter it will gives you the number of files in the specified folder as you given. . - this step is already done.
When the number of files reaches your count startup your webservice that which can polls the files. . . - how can i acheive this?? Have to poll the directory and process the number files - please let me know, what could be added to the webservice which is being invoked after cheking file count from parent process.
The reason for the above question is - we cannot use ReadFile operation in second webservice because it will be automatically triggered when the file is avilable. Also SyncRead operation supports reading one file in b/w bpel process. Kindly explain me the implementation steps.
Thanks,
JJ -
FM to get the file from application server to presenatation server automati
Hi!
In my upload program I am egtting the error log file onmy application server directly. Is there a function module or a way that in my abap code I can mention to bring the file or transfer the file to the presentation server . As my program is been run in the back ground so I cannot directly get the file on the presenattion server, so I need to bring it back on teh presentation server back to see teh eror log.
I would like my program to do the transfer in background itself so that I can see the error log on a daily basis from my local file .
Thanks
when 'X'. "X is application server
* TRANSLATE p_err USING '\/'." correct slash for unix
open dataset p_err2 for output in text mode encoding default.
if sy-subrc = 0.
loop at t_err into s_nts.
transfer s_nts to p_err2.
if sy-subrc ne 0.
message i010(ad) with p_err2 'Download Failed'.
endif.
endloop.
close dataset p_err2.
else.
message i010(ad) with p_err 'dataset could not be found'.
sy-subrc = -1. "Maintain error condition
endif.
* endif.
when ' '. "Blank is presenation server
translate p_err using '/\'."correct slash Dos file
call function 'DOWNLOAD'
EXPORTING
filename = p_err
filetype = 'ASC' "FTYPE set to DAT in DATA seg
TABLES
data_tab = t_err.
if sy-subrc ne 0.
message i010(ad) with 'File ' p_err 'cannot be located.'.
sy-subrc = -1. "Maintain error condition
exit.
endif.
endcase.
ENDIF.
ThanksSO , after reading all , I assume that there is no way in which when I run the background job and get a errro file on application server can be retrievd on my presenattion serevr during the background job run. I was thinking that theer might be a functionn module which will convert the application server file into presenttion server file during the program run in background and store it in the location provided.
I was trying to use FM CALL FUNCTION 'C13Z_APPL_TO_FRONT_END' and CALL FUNCTION 'ARCHIVFILE_SERVER_TO_SERVER' but using teh first one asks for source file and destination file name during teh program run and as it runs in background it cannot be provided again and again and teh second one dosent seem to work.
Thanks -
Help ...how to get the file size on a server
Hi.I use this code to parse a file that is on a server.
The question is: how can i get the file size (bytes size)?
Thanks.
//Open the file for reading:
URL u = new URL(entry);
InputStream inputXML = u.openStream();
//Build document:
DocumentBuilder builder = factory.newDocumentBuilder();
doc = builder.parse(inputXML);Try this instead:
URL u = new URL(entry);
URLConnection conn = u.openConnection();
// get the file size
int size = conn.getContentLength();
// open the input stream from the URLConnection (which is functionally the same as opening it directly from the URL)
InputStream inputXML = conn.getInputStream();
Shaun -
How do I get the file names on a customized proof sheet?
How do I get the file names on a customized proof sheet?
Actually, I really don't know what you say.
But when you see the properties of a file in Windows, you can see there are two file size. One is called "SIze" and the other one is called "Size on disk".
Therefore, I would like to know the size on disk but not just the size. -
How to get the files in presentation server while uploading?
how to get the files in presentation server while uploading?
give me the function module nameHi,
PARAMETERS: P_FILE LIKE RLGRAP-FILENAME DEFAULT C_PRES. "Prsnt Srvr
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_PATH = P_FILE
MASK = ',..'
MODE = '0 '
TITLE = 'Choose File'
IMPORTING
FILENAME = P_FILE
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5. -
Hi
I have where I have a selection screen that finds the file, you can say where to get the file. After that I need to close that window. How do I close it???
Below is an example of my program. After I choose the file and execute the program, I have a <b>write</b> statement. I don't see that statement on the screen. How do i terminate the input screen and display text.
Parameters : AUSZFILE LIKE RFPDO1-FEBUMSF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR AUSZFILE. "mo271101
DATA: L_FILES TYPE FILETABLE,
H_FILES TYPE FILE_TABLE,
L_RC LIKE SY-SUBRC.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG CHANGING
FILE_TABLE = L_FILES
RC = L_RC
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
OTHERS = 5.
IF SY-SUBRC <> 0 OR L_RC < 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO "mo271101
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE. "mo271101
READ TABLE L_FILES INDEX 1 INTO H_FILES.
AUSZFILE = H_FILES-FILENAME.
ENDIF.
Write AUSZFILE.
Thanks in advanceYou must remember the START-OF-SELECTION event here, after you select the file name and click F8, the START-OF-SELECTION event is triggered, but if it is not there, nothing will happen.
if sy-subrc <> 0 or l_rc < 0.
message id sy-msgid type sy-msgty number sy-msgno "mo271101
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
else. "mo271101
read table l_files index 1 into h_files.
auszfile = h_files-filename.
endif.
start-of-selection. "<-- Add this
write:/ auszfile.
Regards,
RIch Heilman -
I am trying to make a pdf of a file and I need to get the file size to be no bigger than 10MB. Even when I save it, the image quality at minimum the file size is 10.9 MB. What is the best way to do this
@Barbara – What purpose is that PDF for? Print? Web?
If web purpose, you could convert CMYK images to sRGB. That would reduce the file size as well.
A final resort to bring down file size is:
1. Print to PostScript
2. Distill to PDF
That would bring file size down even more. About 20%, depending on the images and other contents you are using, compared with the Acrobat Pro method. If you like you could send me a personal message, so we could exchange mail addresses. I could test for you. Just provide the highres PDF without any downsampling and transparency intact. Best provide a PDF/X-4.
I will place the PDF in InDesign, print to PostScript, distill to PDF.
Uwe -
How is it posible to get the File name, size and type from a File out the H
How is it posible to get the File name, size and type from a File out the HttpServletRequest. I want to upload a File from a client and save it on a server with the client name. I want to conrole before saving the name, type and size of the file.How is it posible to get the File name, size and type from a File out the HttpServletRequest.
form JSP
<form name="form" method="post" action="procesuploading.jsp" ENCTYPE="multipart/form-data">
File: <input type="file" name="filename"/
Path: <input type="text" readonly="" name="path" value="c:"/
Saveas: <input type="text" name="saveas"/>
<input name="submit" type="submit" value="Upload" />
</form>
proces JSP
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="FileUploadBean" %>
<jsp:useBean id="TheBean" scope="page" class="FileUploadBean" />
<%
TheBean.doUpload(request);
%>
BEAN
import java.io.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletInputStream;
public class FileUploadBean {
public void doUpload(HttpServletRequest request) throws IOException
String melding = "";
String filename = request.getParameter("saveas");
String path = request.getParameter("path");
PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("test.java")));
ServletInputStream in = request.getInputStream();
int i = in.read();
System.out.println("filename:"+filename);
System.out.println("path:"+path);
while (i != -1)
pw.print((char) i);
i = in.read();
pw.close();
}Thanks it works great.
Here an excample from my code
import org.apache.commons.fileupload.*;
public class FileUploadBean extends Object implements java.io.Serializable{
String foutmelding = "geen";
String path;
String filename;
public boolean doUpload(HttpServletRequest request) throws IOException
try
// Create a new file upload handler
FileUpload upload = new FileUpload();
// Set upload parameters
upload.setSizeMax(100000);
upload.setSizeThreshold(100000000);
upload.setRepositoryPath("/");
// Parse the request
List items = upload.parseRequest(request);
// Process the uploaded fields
Iterator iter = items.iterator();
while (iter.hasNext())
FileItem item = (FileItem) iter.next();
if (item.isFormField())
String stringitem = item.getString();
else
String filename = "";
int temp = item.getName().lastIndexOf("\\");
filename = item.getName().substring(temp,item.getName().length());
File bestand = new File(path+filename);
if(item.getSize() > SizeMax && SizeMax != -1){foutmelding = "bestand is te groot.";return false;}
if(bestand.exists()){foutmelding ="bestand bestaat al";return false;}
FileOutputStream fOut = new FileOutputStream(bestand);
BufferedOutputStream bOut = new BufferedOutputStream(fOut);
int bytesRead =0;
byte[] data = item.get();
bOut.write(data, 0 , data.length);
bOut.close();
catch(Exception e)
System.out.println("er is een foutontstaan bij het opslaan de een bestand "+e);
foutmelding = "Bestand opsturen is fout gegaan";
return true;
} -
One of our DPs has stopped loading content.
I've research for quite a bit and cannot find a clear cut reason to this. This server only has a DP role, I verified sharing permissions, all looked good. This DP has been running just fine for the last year or so and all sudden it will no longer load
packages. The disk drive is still present I can still reach the hidden share \\servername.com\E$
Verified that the SMSSIG$ folder is there and the last entry is from 4/23/2015
SCCM 2012 R2
OS 2008 R2 Standard
Any help is greatly appreciated!
Here's a snipit from the distmgr.log
Start updating the package on server ["Display=\\*****.com\"]MSWNET:["SMS_SITE=1AB"]\\*****.com\...
Attempting to add or update a package on a distribution point.
Will wait for 1 threads to end.
Thread Handle = 0000000000001E48
STATMSG: ID=2342 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_DISTRIBUTION_MANAGER" SYS=***.com SITE=1AB PID=2472 TID=8252 GMTDATE=Thu Apr 30 19:12:01.972 2015 ISTR0="SYSMGMT Source" ISTR1="["Display=\\*****.com\"]MSWNET:["SMS_SITE=1AB"]\\*****.com\"
ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=2 AID0=400 AVAL0="CAS00087" AID1=404 AVAL1="["Display=\\*****.com\"]MSWNET:["SMS_SITE=1AB"]\\*****.com\"
SMS_DISTRIBUTION_MANAGER 4/30/2015 2:12:01 PM
8252 (0x203C)
The current user context will be used for connecting to ["Display=\\*****.com\"]MSWNET:["SMS_SITE=1AB"]\\*****.com\.
Successfully made a network connection to \\*****.com\ADMIN$.
Ignoring drive \\*****.com\C$\. File \\*****.com\C$\NO_SMS_ON_DRIVE.SMS exists.
Unable to get the file system information for: \\*****.com\E$\; error = 64.
Failed to find a valid drive on the distribution point ["Display=\\*****.com\"]MSWNET:["SMS_SITE=1AB"]\\*****.com\
Cannot find or create the signature share.
STATMSG: ID=2324 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_DISTRIBUTION_MANAGER" SYS=sccmprdpr1sec2.mmm.com SITE=1AB PID=2472 TID=8252 GMTDATE=Thu Apr 30 19:12:55.206 2015 ISTR0="["Display=\\*****.com\"]MSWNET:["SMS_SITE=1AB"]\\*****.com\"
ISTR1="CAS00087" ISTR2="" ISTR3="30" ISTR4="94" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=2 AID0=400 AVAL0="CAS00087" AID1=404 AVAL1="["Display=\\*****.com\"]MSWNET:["SMS_SITE=1AB"]\\*****.com\"
Error occurred. Performing error cleanup prior to returning.
Cancelling network connection to \\*****.com\ADMIN$.Error 64 is being returned which is simply "the network name is no longer available".
There can be a number of reasons for this from SMB compatibility issues (2003 servers wont support SMB2), to the expected and actual computer name of the boxes don't match (tries to authenticate with server.tld.com when the actual name is srv-01.tld.com and
you just put a C-name in). I'd start from the top: Try opening said share from the Primary Site server as that's the box doing the work. Verify the IP and computer name is legit and that no one has played ACL games between the two systems (remember
RPC only initiates/listens on port 135 but established connections are up in the dynamic port range).
At the end of the day it's an issues "underneath" SCCM, and not an SCCM problem specifically. -
Is there any way to get the files from other computer ?
Hai all,
I have 2 computers connected. I know the IP address of other computer. Is there any way to get the files from other computer. (for e.g. I want to get the files from specific folder. In Java netwroking is it possible? (Any programs)
regards,
NamancBro Take it easy.
Think you need to send a Image file named ("abc.gif")
now develop a server using ServerSocket and connect it in local IP and any PORT
For example i think ur server is connected in "localhost" and 9000 port.
Now make ur server educated using some commands.
For example:
FileName: <File Name String>
[Means new file is sending by connected client]
FileSize: <File size long or int value>
[ So that ur server can determind about the total length of sender file]
DataModeOpen
[Now your client will send its image data, this command means your client software is sending data]
fjadlkfjaofaijojfwoeiurfodkjflsajlfksa
l23j4lj23lkjlasjfoq23j4rokjelfkjasldkf
2o3j4lk2j3ljslakdjf2l3j4 l23kjlk23k4j
DataModeClose
[Means file sending finished]
Close
[Means your client connection is closed]
Now develop a client supporting this command.
For example(Server):
String getFileName=null;
long getFileSize=0;
public handleCommand(String getCmd) {
if(getCmd.startsWith("FileName")) {
String[] splitData=getCmd.split(":");
this.getFileName= splitData[1];
outPutStream.writeBytes("+OK");
} else if(getCmd.startsWith("FileSize")) {
String[] splitData=getCmd.split(":");
this.getFileSize=Long.parseLong(splitData[1]);
outPutStream.writeBytes("+OK");
} else if(getCmd.startsWith("DataModeOpen")) {
//data mode open so receive data
receiveData();
outPutStream.writeBytes("+OK");
} else if(getCmd.startsWith("DataModeClose")) {
//close client socket
getClientSocket.close();
}For client:
DataInputStream dataIn=null;
BufferedOutputStream bout=null;
public sendFile(bytes[] getBytes) {
//if ok found then do other or show error message
if(sendCmd("FileName:"+getFileName)) {
if(sendCmd("FileSize:"+getFileSize)) {
if(sendCmd("DataModeOpen")) {
bout.write(getBytes);
} else {
showError(3);
} else {
showError(2);
} else {
showError(1);
}i think it will help u -
[CS3][JS] How to get the file type of current document
Hi,
How to get the file type of current opening document (e.g., tif, jpeg, png) using JavaScript with Photoshop CS3.
I am using file object the open the files one by one in the folder (the files sometimes don't have the extensions).
If the current document is in tiff format then I need to convert to 8-bit, if its an Jpg image then needs to ignore the file.
Regards,
KarthikDo you really need to know the file type? What about just checking the bit depth?
var doc = activeDocument;
if (doc.bitsPerChannel != BitsPerChannelType.EIGHT) {//Not 8 bit
doc.bitsPerChannel = BitsPerChannelType.EIGHT;
//do your save etc
}else{
//Ignore -
I cannot open iTunes. This is the message I get: "The file iTunes library .itl cannot be read because it was created by a newer version of iTunes. Would you like to download iTunes now?" I did a download and it is up to date, but still won't open. HELP
See Empty/corrupt iTunes library after upgrade/crash.
tt2 -
When I try to access iTunes I get 'The file "iTunes Library.itl" cannot be read because it was created by a newer version of iTunes. Would you like to download iTunes now?'' But when I try to down load I get "unknown error occurred (-42408)". Don't know what to do next and I can't get into my iTunes library. (I have an iMac, OS10.6.8.)
Did you uninstall iTunes 11 and replace it with iTunes 10.7? If so, you'll need to go through a few steps to put things right:
Rename "iTunes Library.itl" to some other name;
Copy newst ITL file from the "Previous iTunes Libraries" folder into your main iTunes folder and rename it to "iTunes Library.itl";
Download iTunes 10.7: http://appldnld.apple.com/iTunes10/041-7195.20120912.d3uzQ/iTunes10.7.dmg
Download/install shareware app called Pacifist;
Open Pacifist and, separately, mount iTunes DMG file -- drag iTunes PKG file into Pacifist and install iTunes via the Pacifist application -- be sure to answer yes to replacing everything Pacifist asks about;
Enjoy iTunes 10.7.
Cheers,
trane
Maybe you are looking for
-
Remote Desktop Connection ok on work wireless but not from home
I've succesfully logged into the Win 2003 SBS (Terminal Services) from within the wireless connection at work using Mircrosoft's "Remote Desktop Connection". However when I try to do this from home I get the following error message "Either remote con
-
Logic Pro audio error 10011 (drop out)
I bought a new mac mini yesterday that meets all requirements for Logic. I bought it to run Logic as a dedicated machine linked to a keyboard. Apart from the basic software that came with it, Logic is the only software installed on it. Installed it a
-
Unable to connect oracle8i from forms developer6.0
Hello! I am unable to connect oracle 8i from forms 6.0 developer. How can I resolve this issue. Please reply me as soon as possible Thak you Dinakar
-
Have heat issues into MacBook pro when boot from windows partition how can I fix it??
-
Sync AUDIO to VIDEO in FCPX with timecode only (no scratch audio)
We shot a film on the RED. We will be editing the film in Apple ProRes. The audio was recorded separately. And we have no camera audio to use as scratch to sync audio waveforms with AutoSync. I am looking for a solution to batch sync my project usi