FM to find directory of a file
Hi,
Are there any function modules that get a file name and find its directory? Thanks..
hi,
You can use FILENAME_GET to get the filename.
Check the link for more details:
Re: Reading file names in App server
Re: Read Directory & file from appilcation server
Similar Messages
-
Finding directory of attached file (mail)?
Hi I have a script which brings up the "attach file" menu of mail. Is there any way to set the folder they came from so I can use it later in the script. I suspect this is not possible as I am no longer in the script when the files are choosen.
Working the other way I could modify the script to choose the files in applescript, then the directory is easy to set but not so easy to attach to a mail message.
thanks
I wish I knew more about applescript so could stop asking questions and answer some.Unfortunately that's not possible with outgoing messages created in Mail's UI. You can only add attachments to outgoing messages created in AppleScript. It doesn't matter which script creates the mail message, though, so you could have one script that creates the message, and another that adds the attachment…
click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">tell application "Mail" to tell (make new outgoing message) to set visible to true
</pre>click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">set the_files to choose file with multiple selections allowed
tell application "Mail"
tell front outgoing message
repeat with a_file in the_files
make new attachment with properties {file name:a_file} at after the last paragraph
end repeat
set visible to true
end tell
end tell
tell application "Finder" to set a_folder to a_file's container as alias
</pre> -
VB Script to find the last modified file and time in a directory
Hi,
I am new to VB script i need a script to find the latest modifed file and last modifed time in a directory(Contains folders and sub folders inside it). it has to go through all the folders and get the latest file and last modifed time.Thanks it worked for me Get-ChildItem C:\Users\sujith.reddy.komma\Desktop\Suj1\* -recurse |?{-not $_.PsIsContainer} |Sort LastWriteTime -desc | select -first 1 now in my script i have hard coded the directory i need to run this script in different
servers from one location i will put all the different paths in one text file and ineed to pass them to this script can you help me with this?
Essentially you are incrementally asking us to write each line for you. I recommend freeing yourself of this misery and leraning PowerShell. THe answers to all of your questions are learned in the first few hours of study.
Start here:
http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
¯\_(ツ)_/¯ -
How to Find there is a file in directory or not?
Hi,
In my application there is a module in which I have have to export files.
if in exported file there are directories ..then zip them all.
Zip only when they contain any files...
Can you please help how can I find that Directory has a file or not...
any example code ...
Bunty
Message was edited by:
bunty_indiaSorry...
I have done this recursively...in the following program
Only problem left is .....when ever the following program found File means go to the else part the control should stop & come out out of the function & return true.....
How can i return this on finding First file.....
Please help
import java.io.*;
public class DirFileFind
public static void main(String args[])
File ff=new File("C:\\ccm\\OutPutArtifacts");
int flag = getDir(ff);
if (flag > 0)
System.out.println("Zip Created Successfully!! " + flag );
else
System.out.println("Oops I Did it again :( " + flag);
public static int getDir(File dir)
// boolean aFlag=false;
if (dir.isDirectory())
String[] temp=dir.list();
for(int i=0;i<temp.length;i++)
//System.out.println(temp);
getDir(new File(dir,temp[i]));
System.out.println("It Is a Directory " + dir.getName());
//System.out.println("It Is a Directory " + dir.getName());
//aFlag=false;
return 0;
else
System.out.println("It Is a File " + dir.getName());
// aFlag=true;
return 1;
Message was edited by:
bunty_india -
Finder not displaying all files in remote directory
Sorry, this is a repost as I have gotten no response from my original request here: Finder not displaying all files in remote directory
I've exported pictures from iPhoto on my iMac to a shared directory on my mac mini. When I access that directory from my iMac, I can see some but not all of the pictures. I know the pictures exported properly because I can see them all from the mac mini. I can open up a terminal window on my iMac and see all of the files; I can also open those files from the terminal.
I'm running OSX 10.9.4 on both computers, with the mac mini also running OSX Server. I've placed a screen grab below from my iMac of what Finder sees vs what I can see from the terminal.
Why isn't Finder displaying all of my files?thanks for responding
Adding a new file to the shared folder results in me being able to see the new file from my clients regardless of where it was added from, however the "hidden" files do not suddenly pop up.
I tried a few more experiments that had interesting results, but still didn't lead me to an answer.
First I tried copying the files from the remote directory to a local directory; I did this in 2 different ways and had different results. Method A) I copied files from the mounted share to a local dir: "cp /Volumes/MyShare/dir/*.JPG .". Method B) I copied the files using secure copy: "scp user@server:/path/to/dir/*.JPG .".
Method A resulted in Finder not being able to see the files in the local directory, while Method B did. This was interesting and lead me to suspect an issue with the way I am sharing the directory on the server. From Server settings I have both afp and smb checked. I tried enabling only one or the other and reconnecting; but this did not fix the problem.
Next I tried exporting the photos from iPhoto again. Exporting them locally results in files that Finder can see. Exporting them to my server results the same bad behavior
Getting desperate, I also tried renaming all of the files from "*.JPG" to "*.jpg" but this didn't help.
One last experiment, I see the same behavior from both another Mac and a PC on my local network... FTP works fine.
Any more ideas? -
How can i find total no of files in a directory ..using fileconnection
how can i find total no of files in a directory.
currently iam using
Enumeration enum = fileconn.list(); and by iterating iam getting count.
but the application is getting stuckup when the number of files in the directory is large.
Is there any alternative. please help.
thanks in advance.HI,
this is a simple example with a cursor over user_tables view:
set serveroutput on
DECLARE
CURSOR c_test IS
SELECT table_name FROM user_tables;
type t_reg is table of varchar2(30);
l_reg t_reg;
BEGIN
OPEN c_test;
fetch c_test bulk collect into l_reg;
dbms_output.put_line(c_test%ROWCOUNT);
END;
/Output:
SQL>
SQL> set serveroutput on
SQL> DECLARE
2 CURSOR c_test IS
3 SELECT table_name FROM user_tables;
4 type t_reg is table of varchar2(30);
5 l_reg t_reg;
6 BEGIN
7 OPEN c_test;
8
9 fetch c_test bulk collect into l_reg;
10
11 dbms_output.put_line(c_test%ROWCOUNT);
12 END;
13 /
42
PL/SQL procedure successfully completed
SQL> Regards,
Edited by: Walter Fernández on Nov 29, 2008 8:59 AM - Adding output... -
Cp: com.apple.finder.plist: No such file or directory
Hello,
As the title suggest, I'm having a problem with cp.
As the matter of fact, com.apple.finder.plist is inside the preferences folder but why "No such file or directory"?
The-Universe:~ LS$ cp com.apple.finder.plist com.apple.dock.plist.bak
cp: com.apple.finder.plist: No such file or directory
I learnt this command-line form the "Mac OS X Server Introduction to Command-Line Administration Version 10.6 Snow Leopard", pg 38.
Thanks!
Cheers.I would suggest having a backup of your whole disk, and particularly of any critical files, before proceeding here.
The the documentation is assuming that you're defaulted into the expected directory, and the path to the plist directory is discussed in the immediately previous section of the manual you're working with. If you're logged into the user you want to edit, the plist files are here: ~/Library/Preferences/
So some of the bash-level commands that can be used here (and that you will want to understand) follow:
ls ~/Library/Preferences/
ls -alR ~/Library/Preferences/
cd ~/Library/Preferences/
ls
ls com.apple.finder.plist
cp com.apple.finder.plist com.apple.dock.plist.bak
The specific error here appears to be that the default directory is not in the expected directory. That's what cp has indicated; that there's no file with the specified filename here. The current directory is what the pwd and cd commands will work with, too. See +man pwd+ and +man cd+ for details.
The Unix layer is comparatively unforgiving, and it's easy to corrupt a disk with an errant command. And the manual you're reading isn't going to explain what are the basics of the Unix file system organization and the bash shell; that's assumed knowledge for that manual, and outside the scope of what that manual is going to be documenting. Do have a backup of your disk, and of your critical data. -
How to find directory java program .jar file is in?
I have a Java program that needs to save some configuration and data files in the same directory as the .jar file that contains the program.
If the user launches the app from that directory, it's easy.
The problem is when they do something like "java -jar /dir1/dir2/program.jar".
When they do that, HOW can I find the directory the .jar file is in - from within the program?CasaDelGato wrote:
I have a Java program that needs to save some configuration and data files in the same directory as the .jar file that contains the program.
If the user launches the app from that directory, it's easy.
The problem is when they do something like "java -jar /dir1/dir2/program.jar".
When they do that, HOW can I find the directory the .jar file is in - from within the program?There is an obscure way that basically consists of the following.
1. Get the class loader of the class (obviously one in the jar)
2. Find the 'resource' of that.
3. Resolve that to a path
4. Make it absolute if not already.
5. Extract the directory part.
2 and 3 are always the hard ones (conceptually and figuring out from the javadocs). There are examples somewhere on the forum. -
My Macbook Pro can't find any of my files!
Hi there,
Since yesterday, my Mac suddenly can't find any of my files anymore. All the folders are there, but all the files are missing. There are 2 big question marks on the top of the finder window and when I click on them it says that files cannot be found. I have no clue what to do now. The only thing I did before this happened, was deleting my downloads folder, but nothing more. It's weird that all the folders are visible but the content not. Anyone experienced this too? What can one do in a case like this?
Thank you for any help!
RaphaelaDid you run a disk check on it? You might have data corruption. The big question mark on the top of the finder window, I believe is a short cut, not the actual file. Did the actual file move? Did you rename the file? Did you change anything, like your username? Did KIDS use your machine? KIDS can do some silly stuff to your computer without even realizing it. I know this option may sound OFF BASE, but do you have a faulty trackpad, or use excessive hand lotion? (I have seen both of these cause undesired file moves, renames, etc...)
I would run a disk check, and if available, use Disk Warrior, Drive Genius or similar to rebuild the directory.
If that does not help, I would search for the file using Spotlight, or a 3rd party app like Find Any File. -
How to find out the Trace file
Hi Dba's
I need to find out the trace file with the Request id. how can i find out it?
ThanksThere are many ways to create a trace file in the apps. Pl provide details on how you enabled trace, as that will determine where the trace file is created.Concurrent requests trace files are always created under USER_DUMP_DEST directory.
-
I installed and few times reinstalled Visual Studio 2013 Community Update 4 from ISO and web installer, SHA-1 is correct. However every time installation process didn't create this directory (also its subdirectories and included files):
C:\Program Files (x86)\MSBuild\12.0\bin
In registry I have entries about MSBuild 12.0 including path to mentioned directories (...\bin and ...\bin\_amd64). Also during creation of project I receive errors:
"Unable to read project... The imported project... C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.targets was not found. Confirm..."
It's understandable, because I have only these files and subdirectories in C:\Program Files (x86)\MSBuild\12.0:
Microsoft.Common.props, Microsoft.VisualStudioVersion.v12.Common.props, Microsoft.Common.Targets (directory and its subdirectory: "ImportAfter" that includes files: Microsoft.VisualStudio.ReleaseManagement.BuildInfo.ImportAfter.Targets, Microsoft.VisualStudio.Silverlight.SDKTools.targets).
I don't have subdirectory: ...\bin and its content.
I tried install Microsoft Build Tools 2013 but without result. Everything I did on Administrator account on Windows 7 x64.
I don't want to reinstall OS, so could anyone send me entire directory: "C:\Program Files (x86)\MSBuild\12.0\bin" (with subdirectories and msbuild.exes (x86, x64))?Hello starjacker0,
I have a new installed Visual Studio which installed Visual Studio 2013 and I can see the folder you showed. Hence, I think your problem is pending on your installation and I recommend we focus on this installation problem first.(I'm not allowed to send
you these files on the forum.)
Please navigate to your %temp% folder and find the following logs out:
Or you can use http://aka.ms/vscollect
to gather the installation logs. After using it, you will find vslogs.cab from %temp% folder. Please upload the file to OneDrive and share the link for me, I will help you analyze this file. The log can tell us the reason why it cannot create files under
that folder.
If you have collected the logs, please try clear your %temp% folder and restart the MSBuild installation. I suspect VS installer cannot overwrite the %temp% folder which may cause your problem. However, you know, without logs I'm also not sure of the reason.
Best regards,
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Where can I find the latest cab file?
Where can I find the latest cab file? for example:
CODEBASE=http://java.sun.com/update/1.5.0/jinstall-1_5_0_05-windows-i586.cab
CLASSID=clsid:5852F5ED-8BF4-11D4-A245-0080C6F74284 It is not available on this page: http://java.com/en/download/manual.jsp
I am deploying using web start. So I need it.
thanks,
AnilDownload Java EE SDK, install it and finally in the lib directory you'll find the javaee.jar. It contains the whole javax package you need.
-
Problem with finding directory
Hi,
I built an application on Windows and I have to find a document within another directory. I am using getAbsolutepath and I am having problems with the following type of path:
File test = new File("u1/usr/my program/myFile/")
if(test.isDirectory())
this works on Windows, however it doesn't work on Unix....I also tried the following on Unix
File test = new File("u1/usr/my\\ program/myFile/")
if(test.isDirectory())
and it also doesn't work.
thanks in advance for any help!I just made a directory with a space in it (on Linux) and created a file to find it, and it worked fine. I have the directory
/home/joshua/my directory
And made the call
File file = new File("/home/joshua/my directory");and the file did exist and was a directory.
Try testing the call with
System.out.println("file = " + file.getAbsolutePath());
And make sure that that file exists. -
Is it possible to use JavaScript to search a directory of PDF files?
A company I am interning for is looking for a solution. They want to allow users to search within their PDF user manuals by typing a string into a search field and returning the PDF document link or page link. Is this possible? How would I accomplish this? I have only been programming for 1 year.
Can adobe reader use javascript to create a link that we attach the directory to? If not how or what would you do?
Thank you.Ideally, I would like a link to Adobe Reader or Acrobat that only allows users to "Search Our Manuals for Help". The user types in "Commission Invoice Inquiry" and in return gets links etc. to the PDF's in our directory of files containing that inquiry or "string".
User scenario: User gets new software from company but needs to look in manual on how to get "commision invoice inquiry". So user goes onto my company's website and finds this said application I am looking for and types in "commission invoice inquiry" and hits enter. The application then searches through the company's directory of PDF files (manuals) for "commission invoice inquiry" and returns any page links within the PDF that have that "commission invoice inquiry" on them. It can open inside of Adobe Reader or Acrobat or whichever. The company is even willing to pay for said "plugin" or application. -
I'm getting this error when I try to install the newest version of Itunes. I have tried so many things. Please help.
installer has insufficinent privileges to access this directory c:\program files\ipod\bin log on as administratorOkay.
Let's try running a disk check (chkdsk) over your C drive.
XP instructions in the following document: How to perform disk error checking in Windows XP
Vista instructions in the following document: Check your hard disk for errors
Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards?
Maybe you are looking for
-
Switching to Win 7 kills High Quality Display Performance option?
I recently switched from Windows XP to Windows 7. I am running CS2. The files I work with contain placed PDF pages in InDesign. I have verified all links are good. The placed PDF pages contain some pages that are scans, and some containing live text.
-
My icloud account is not verifying it says check my mail witch I have done and I get a message say your iPhone for has been used to set up and Icloud account but still can not use the icloud can anybody help me.
-
Payment not possible because of reported error Message no. FZ311
i am a fresher in FI module... kidly give the solution how to solve the error in automatic payment program..f110... i have attached my log here.... Job log overview for job: F110-20140315-A1 -X / 13365701 Date Time Message text Message class Mess
-
hello experts; I have a query similar to this below create table tbl_test as select tp.id from select '180 main st' as ID from dual union all select '190 main st' as ID from dual ) tpI am trying to make the id field an hyperlink, so that when it is c
-
Is it possible to change the app icon for websites?
Hi, I have created a web shortcut to my home screen, at the moment the icon defaults to a shot of the web page (although very small) and was wondering if it was possible to change the app icon ?