Obtaining file name from the file path given
hi,
how to obtain file name from the file path given
Hi bharath,
1. PC_SPLIT_COMPLETE_FILENAME
2.
DATA : path LIKE pcfile-path.
DATA : extension(5) TYPE c.
path = filename.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
* CHECK_DOS_FORMAT =
IMPORTING
* DRIVE =
extension = extension
name = name
* NAME_WITH_EXT =
* PATH =
EXCEPTIONS
invalid_drive = 1
invalid_extension = 2
invalid_name = 3
invalid_path = 4
OTHERS = 5
regards,
amit m.
Similar Messages
-
Hi ALL,
Can any one help us regarding How to fecth the Date column(or month column) from the file name specified in the path in a generalized way .
For example :
file name is :subscribers (Cost) Sep13.csv is specified in the below path
E:\Accounting\documents\subscribers (Cost) Sep13.csv
here I need to fetch the "Sep13" as a Date column in the ODI 11g in the generalized way.
Can any one help us in this case as early as possible.I would suggest using a piece of Jython code for this. Something like this...
import os
import os.path
filelist = os.listdir(E:\Accounting\documents\)
for file in filelist:
datestr = file[19:-4]
You'd need to work out what to do with datestr next... perhaps write it to a table or update an ODI variable with it.
Hope this is of some help. -
Seperating file name from the path
Hi,
im trying to validate the file path and trying to seperate file name from the path.
for eg.
if the path is f:\sapfilepath\doc\ext.txt
need to get f:\sapfilepath\doc im looking for a dynamic way of doing this.
your help will be appreciated.
Regards,
ravi.Hi,
Use the function module
SO_SPLIT_FILE_AND_PATH
Thanks,
Naren -
Get a font's file name from the font's postscript name (on Windows)
I am trying to obtain the the font file name when the only information I have is the font's 'postscript' name. (Emphasis: the font's name is postscript and not the font).
For example I have the following postscript name: TimesNewRomanPSMT.
The real name that is saved in the registry is: Times New Roman (TrueType).
Is there any way of obtaining that name from the given postscript name?
Currently I am coding this for Windows, but it should be compatible, or at least have alternative code for MacOSFunny. I'm having the same problem and was about to post the exact same question
In Photoshop, there is "app.fonts", which lets you get a font's postscript name from the font's name. This doesn't exist in After Effects.
My only hope is that there's a way to get a font's postscript name in Visual Basic. I'll let you know if I find anything useful. -
Can we possible to retrive the file name from the directory...?
Can we possible to retrive the list of files or file names from the directory...?
The directory called create or replace directory [directory_name] as ....Yeah, yeah its very good example for this scenario.
I agree. But, I want to learn about Java based PL/SQL code development for that just I am asking any link for this kind of material.....:-) -
Capture File name from the messageFileUpload bean
Hi All,
Please let me knw, how to capture the file name from the messageFileUpload bean. I have attached a blobdomain type view attribute to this bean. I am able to get the file content , but not able to capture the file name entered.
Please help me ...very urget...
Regards,
TarunAny solution for this?
Thanks
Santosh -
"Could not save (file name) because the file is already in use or left open."
Hello,
When I tried save as a file, I get an error msg:
"Could not save (file name) because the file is already in use or left open."
The file is not open anywhere accept Photoshop.
Mac Pro, OSX 10.5.6
Photoshop CS4.
I searched the forum but could not find anything even though i'm sure someone already asked it.
would love to get a solution for that.
thank you,
shlomitThere is a problem with both Photoshop and InDesign, then we can blame wich ever it is.
1. I open a .psd file in Photoshop CS4 by double clicking it in Bridge
2. This image is placed on a page in a open InDesign document.
3. Doing some changes in Photoshop on the image.
4. Trying to save and get this error message (this topics subject)
5. Deleting the image from the page in ID doc, it is the only one in the document.
6. Can't still save file.
7. Closing ID completely and now I am able to save the file.
I tried turning of Live preflight in Indegisn but that didn't help.
So probably the fault is InDesign or the MacOS. I didn't have this problem with CS3. It is a stupid problem because this type of workflow is pretty common and one would expect it to be solved by now.
Jan Suhr
Stockholm, Sweden -
Get Logical file name from Physical file name
Hi everybody,
Please how can i get Logical file name from Physical file name ?
Thanks & Regards
HassanHi,
What i want is to get Logical file name from Physical file name, and not the opposite (get Physical file name from Logical file name).
Thanks & Regards,
Hassan -
Change File Name In The "File Download" Dialog Box For Web Reports
Hi All ,
I followed the below note to change the "File Download" name.
How To Change The File Name In The "File Download" Dialog Box For Web Reports? Doc ID: Note:418366.1
However its not working. Has anyone tried this and works fine ?
Basically I wanted to change the name "rwservlet" when a report is run in an
excel format.
Rajesh Alex
Rajesh AlexHello,
Have you checked if a HTTP header "Content-disposition" is returned ?
You can use ieHTTPHEaders for IE
http://www.blunck.se/iehttpheaders/iehttpheaders.html
and
Live HTTP Headers for FireFox
https://addons.mozilla.org/en-US/firefox/addon/3829
Regards -
Could not save as (file name) because the file could not be found
When i try saving sothing it comes up with could not save as (file name) because the file could not be found and need to save this file. i could save stuff before but not anymore if anyone could help i would be grateful
im using photoshop cs5.1
Thanks keironWe cannot know. These kinds of things are operating system errors with stuff getting blocked due to insufficient permissions, security tools interfering, network errors or whatever. Since you mentioned none of that, it's an "Ask your mom..." thing at this point, but if you provide more details, someone might be able to figure it out.
Mylenium -
When downloading, previously Firefox would show a number at the end of the file name (renaming the file by adding a number) showing that I had already downloaded a file at least once. Now that isn't happening. How do I get that feature back?
When downloading, previously Firefox would show a number at the end of the file name (renaming the file by adding a number) showing that I had already downloaded a file at least once. Now that isn't happening. How do I get that feature back?
-
Retrieve file name from full file path
I am trying to retrieve a file name from a path (ex. c:\temp\tes.txt) using the following code, but it is given me an error of "The method split(String) in the type String is not applicable for the arguments (char).
{code}
String filepath = item.getName();
String[] buf = filepath.split('/');
String filename = buf[buf.length-1];
{code}
I tried to use double quote instead of single quote, but it is not returning anything.
{code}
String[] buf = filepath.split("/");
{code}
Anyone knows why? Thanks.How is this related to JDBC?
Anyway, is the path separator actually a forward slash? Isn't it a backward slash?
If you're using Apache Commons FileUpload (which I guess, the 'item.getName()' is recognizeable), then just read their FAQ: [http://commons.apache.org/fileupload/faq.html#whole-path-from-IE]. -
Getting file name from a file path
Hello
I have got a String called filePath and it holds: "C:\Documents and Settings\paul\MyDocuments\nihtd.txt".
What I want do is to have another String variable called fileName that will use the 'filePath' variable to return the name on the file (that been "nihtd.txt" for the example given) but it must work with any file path for any file type.
Can anyone help? I have tried various ways but with no success.
Many thanks
PaulHmm, I just ran across another distinction between doing this by creating a File object as opposed to doing this by analysing the String: performance.
I always thought that creation of file objects is relatively cheap, since the Filesystem is not actually accessed when you create a new File instance. Apparently that is not true, at least not if you are on Windows and the file is on another server. Something like new File(\\server\share\file.txt) will create network traffic on Windows. So if you only meant to use the File class for parsing text, you might want to think again.
I would be interested to know how the FileSystem class is implemented on different platforms. Do you know where I can read up on that?
Cheers, HJK -
Changing of the physical file name of the file after archiving
Hi all,
We are in process of archiving and completed the process successfully and archived to o:\PRODSID\<filename>.
When refresh is happening from Prod to Quality the archived data will come as O:\PRODSID\<filename> and the archived files will not be accessible since quality system is not able to find the path with O:\PRODSID\<filename>.
Is there anyway i can change the physical file name of the archived files to correct path O:\QUALITYSID\<filename>, i need to change only the SID only from PRD to QUALITY.
Thanks,
Subhash.GHi Subash,
Do you want change the Physical File name or the Path from PROD to SID.
Path :- in the transaction called FILE, double click on Logical Path Definition , select the Logical File and double click on "Assignment on Physical Path to Logical Path" and you can change FILENAME also here
Thanks,
Sravanthi -
Individual report path with defined file name from the report settings in Testsand 2012
Hi,
I have following task:
I want to test stand 2012 in each sequence to change the path of the report file. But the naming of the file is to be maintained as these settings can be made from TestStand into the report (DisplayName + _Report_ [<FileDate>] [<FileTime>] <unique>. <File Extension). I can not find now, however, the / callback parameter on which the components are assembled path and file in TestStand.
While I can read about the callback "GetReportFilePath" the path and file name, and with the expression: Parameters.ReportFilePath = "c: \ \ electro \ \ SHARE \ \ test protocols \ \ Test Logs \ \" change the path, but the file name will no longer be formed from the settings of TestStand.
I have the suspicion that I'm just not accreting at the right place. Can someone please give me a hint?
greeting Michael
Greetings MichaelSee Oracle Metalink,
..Oracle Portal Technical Forum,
....Subject: PORTAL - uploading files (file attachments) with file names.
This message thread outlines javascript code that automatically captures the filename during an upload.
Maybe you are looking for
-
We get the followign when we navigate to the 'Peoplesoft' domain and then add a servlet and attempt to "persist". everything else seems to work fine. By navigating to the peolesoft domain, we open the default server and use "edit other domain" to pul
-
Error 1603 while updating from iOS5.0 to iOS5.1 on iPhone4
When restarted my computer and reconnects my iPhone, it now prompts saying that iPhone in recovery mode and I must restore before it can be used with iTunes. I am very sure there's 2 backup copies in my (default designated) computer folder, with one
-
Passing hard-coded string parameters into a FUNCTION
I created a Function that accepts two INT and two VARCHAR2 parameters. I want to access it in a SELECT statement and manually pass in parameters to it. For example, SELECT FN_MYFUNC(10, 20, 'string1', 'string2') FROM DUAL; However, when I do this the
-
Browsers : Compatible with EP
Hi gurus, EP is most compatible with IE 7. With IE 8, 9, and even 10, EP has certain issues (unless compatibility mode has been switched on). I would want to have the details of what are the issues that EP has with other browsers (like Mozilla, Chrom
-
I need to move music, pictures and videos from my Mac to my mom´s Windows computer. What is the best way to accomplish this? Why is it so hard to use USB devices? I can never seem to be able to move data thru them... I appreciate any guidance!