Multiple file name selection
Hi
we were using FM "WS_FILENAME_GET" to get the name of file but now my requirement has changed now I can select more than one file at once wit the help of ctrl key . this FM is not able to do so.
Can any one help me in doing this.
Thanks in advance
Edited by: Suchender Dagar on Dec 22, 2010 11:29 AM
Hi,
Please declare filepath variable as :-
select-OPTIONS p_cucrin FOR dbtable-string NO INTERVALS..
Then use below code :-
CONSTANTS :c_txt(4) TYPE c VALUE '.txt'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_cucrin-low.
DATA: is_file_tab TYPE filetable.
DATA: w_default_extension TYPE string VALUE c_txt.
DATA: is_file_line TYPE file_table.
DATA: w_rc TYPE i.
CLEAR : is_file_tab,
is_file_line.
CLEAR: w_rc,
w_default_extension.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
default_extension = w_default_extension
multiselection = abap_false
CHANGING
file_table = is_file_tab
rc = w_rc
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
OTHERS = 5.
IF sy-subrc EQ 0.
*w_rc will hold number of filepaths probably
Loop at is_file_tab INTO is_file_line . " This table will hold the filepaths row by row.
MOVE is_file_line-filename TO p_cucrin. " move this as per your requirement to diff fields
ENDLOOP
ENDIF.
Using above code will provide you filepath length as 1024 characters with F4 help option. also multiple values can be provided to filepath selection screen field. Pass the file names to GUI_UPLOAD FM.
Thanks,
Rupali
Edited by: Rupali Punekar on Dec 22, 2010 11:55 AM
Similar Messages
-
Change multiple files name at once
Hi
I would like to know if someone knows how to change multiple files name in mac. I need to name hundreds of files name, and dont want to do it one by one ... Example: Change from: Doc 1, Doc 2, Doc3 ...to: 2010Summer1; 2010Summer2,etc...
Thanks in advance for any help,
JoaoMake an Automator workflow that changes the name. You would Replace text of "Doc" with "2010Summer". When you open Automator, choose Workflow. Drag in a Get Selected Finder Items and then drag in a Rename Finder Items. Select the "Replace Text" option. Fill in the Details, select the files in the Finder, and then run the workflow.
There are also some third-party file renamers. Check MacUpdate or VersionTracker. I don't know if there are any free ones. -
How can i search for multiple file names (images) in bridge?
Hello everyone!
Does anyone know how to search for multiple file names in bridge?
That is to copy & paste something like this: _MG_2152, _MG_2177, _MG_2194, _MG_2195, _MG_2202, _MG_2212, _MG_2219, _MG_2261, _MG_2362, _MG_2401
Not using several criterias in the search box that is. That takes too long.
Thanks
Steffen Rikenberg Photographer
Oslo, Norway.
www.steffenrikenberg.noTry this add-on [https://addons.mozilla.org/it/firefox/addon/find-all/ Find All]
-
Cannot sync multiple file names
my ipod crashed, i restored and now it says i cannot sync because of multiple file names???
Any help? If I unistall and reinstall iTunes, which ever account / phone I sync to first works, but the other account / phone will not work.
Is there anyone else out there who is successfully syncing 2 phones on 2 accounts on one computer? Why isn't this working anymore - it worked fine for over a year until now? -
How do i change multiple file names to the same name w/ a number value?
I use Windows machines and Macs at my office. In Windows I can take a group of files, let's say JPG's of a factory tour, and when I upload them into Windows, I can "select all", right click and chose "rename". I rename the first file "102511 Widget Tour (1)" and press "enter" Windows automatically renames all the JPG's to "102511 Widget Tour" and progresses the number in the parentheses. In OS X there is not even a "rename" function when multiple items are selected. I've looked at using Automater, but it seems that I would have to construction a new action each time. Any ideas?
If you have Aperture it can do it for you.
Alternative:
I suggest a third part app: Renamer
http://incrediblebee.com -
How to tell if multiple files are selected when they are opened in windows
Hello, can someone help me, my question is how to tell if multiple file selections were made when they were opened (right-click->open). Through modifying the registry I already have my Java program start up when a file with specific extension is double-clicked.
The problem is when multiple files are opened at the same time, an instance of java program is created and run for each of the selected files. Ideally I would like it so that only one instance of java program is run, regardless of the number of selections.
When you try it with Microsoft media player or winamp for example, it seems that only one process is created and run (I don't see many processes spawning when I watch it using task manager). Maybe this is more of Windows issue rather than Java programming issue. Any help is appreciated.If anybody wants to know, this can be solved by either 1) using DDE 2) using DropTarget (from Windows) 3) make a light-weight EXE dispatcher (eg. in C), and use file to have IPC between the dispatcher (which gets the filepath for each of the selections) and the java program. There can be other methods of course. Using the second option is the simplest but it requires WinXP and higher. I implemented it using option 3.. the downside of this is there's a warning message pop up when trying to open many (>20?) files at the same time by Windows. However, option 1 'seems' to have the same limitation. Having a java program created each time for each of the selections seems to be too slow, for viable option.
-
Multiple files names in File adapter
Hi
I File adpater, I can have either P.txt or R.txt or B*.txt.
Is there anyway to achive the same.
Regards
HemaHi Rai,
ur all files are in same directory or different??
if it is same then u can put that...
else
if ur files are in different directory ..say u have 3 files..
then give file name in directory and filename
and other 2 in "Additional Selection"..
i guess this should work
Regards,
Manisha -
File name selection without selecting the extension
It would be more user friendly if selecting a file name in the metadata field "File Name" would only select the name and not the name + extension. You mostly don't change the extension but you do change the file name. Now if I want to rename a file I have to place the cursor between the end of the file name and the dot of the extension (an extra click). If you select a filename in the finder (Os X) only the name is selected. I would like to see Lightroom use the same logic. Thanks!
Is it because you rename each image individually rather than in a batch ? I rename all of my images, but I nearly always batch process the entire shoot. That is very easy to do as you probably already know. I only occasionally have to rename a single image with a special name. I click once on the file name and the entire name is highlighted as you mention. Then I double click and only the "meat" of the name without the extension is highlighted. I didn't have to line the cursor up to the period to get it to do that. This is on a Mac. I am not sure what would happen on a PC. It is pretty fast and simple, although I guess the double click would be a pain if I were renaming hundreds of images. Is there a reason why you are not batch renaming them? In the old days, photographers would often describe the image in the name ("Oldwhitehouse.jpg" for example). Now with LR and keywords, that is not really necessary anymore. Many photographers rename on import with the date/time and sequence number. All that is necessary is that they have a unique name and then use LR to find them later.
my 2¢ anyway...
John
John G. Blair Studio
Occidental, California -
Changing file multiple file names and extensions
hi all
i have just converted a couple of files with some software, but it hasnt put the file extension on, does anyone know of a way to automatically change them, they are already mp4 files but missing the .mp4 on the name part, can anyone help me out to change it without having to manually type it into every single file as that will take me ages now, but i do know for next time when i use this software.
adamJust a warning: are you sure the extension is missing ? in some cases the extension is in the file name but it is hidden (it's used by the system and is exported but you don't see it in the finder).
In order to check it, in the Finder you can select the file icon, and use the Get Info command (cmd-I): when existing the extension can be read in the "Name and Extension" field, but if the Hide Extension option is set, that extension for that file will be hidden in the finder windows.
Piero -
(How) can I change multiple file names in a folder?
My new scanner creates file names with with long, repeated numerical sequences. Can I edit (shorten) the names in batches?
Hey man, no problem.
There are several sites you can look at that will give you a good idea on how to use Automator, such as:
Mac 101: Automator
Automatedworkflows.com tips and videos
(This is the site where I learned everything really, and this site also provides 3rd party actions that have greately helped me with better workflows)
Automator.us videos
Good luck man. -
In filechooser, is there a way that I can "scroll" the displayed list of files based upon each keystroke entered into the dialog's "File Name"?
Is it because you rename each image individually rather than in a batch ? I rename all of my images, but I nearly always batch process the entire shoot. That is very easy to do as you probably already know. I only occasionally have to rename a single image with a special name. I click once on the file name and the entire name is highlighted as you mention. Then I double click and only the "meat" of the name without the extension is highlighted. I didn't have to line the cursor up to the period to get it to do that. This is on a Mac. I am not sure what would happen on a PC. It is pretty fast and simple, although I guess the double click would be a pain if I were renaming hundreds of images. Is there a reason why you are not batch renaming them? In the old days, photographers would often describe the image in the name ("Oldwhitehouse.jpg" for example). Now with LR and keywords, that is not really necessary anymore. Many photographers rename on import with the date/time and sequence number. All that is necessary is that they have a unique name and then use LR to find them later.
my 2¢ anyway...
John
John G. Blair Studio
Occidental, California -
Batch edit multiple file names..
How can I strip out a portion of a file name with a batch process?
For instance :
If my files are named something like '123456789_ABC.png' - how could I strip out the '_ABC' with a batch process?
I have several hundred to do and want to eliminate the human error factor by batch processing..
Thanks!Maybe using '123456789' at the beginning of the sample file name was a bad idea... let me clarify:
Here are 2 of the hundreds of actual files names that I am working with:
6810716b9e2e_back.jpg
6810816b9f84_back.jpg
While the file naming structure would lead you to believe that all are named sequentially, many of the files are not being used so I cannot do a regular batch rename.. I just need to strip out the "_back" without disturbing the rest of the file name... I basically need a 'find and replace' that works within a files name.
thx -
How to retrieve various file names from a filepath of application server
Hi All,
I am using a FILEPATH of application server which can have multiple file names i want to retrieve data from all the existing files.
i am using FM "GET_NAME_FILE" but it is applicable only for file name.
so my question is how to fetch various file names of particular filepath.
Thanks in advance.Hello Mayank,
You can use the below FM and code
PARAMETERS: p_file TYPE rlgrap-filename.
***AT Selection-Screen*******
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
***Function module for F4 help from Application server
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
* EXPORTING
* DIRECTORY = ' '
* FILEMASK = ' '
IMPORTING
serverfile = p_file
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2
IF sy-subrc = 0.
MESSAGE 'Successful' type 'I'.
ENDIF.
Regards,
Mithun Shetty -
Implement check for File Names with data into TRG table
hi,
I am trying to load the Multiple files names & Autonumber to oracle table T1 which is further loaded the auto-number with data to target table TRG. My problem is when the same name file comes again due to size then load it again. & also don't insert Target (TRG) table rows with same data while insert the only those records/rows which are not in Target Table(TRG) .. Is this standard approach. becoz in this way I thing loading Performance speed will b down??
Any other or best recommended approach???/
Thanks
Regards,
AMSIII
Edited by: AMSI on Dec 11, 2012 9:54 PMHey Jason,
Create a validation of type exists. in expression 1 put:
SELECT 1
FROM DUAL
WHERE UPPER(:P9_FILE) LIKE '%TEST.HTML';
{code}
change P9_FILE to your file browse item name and change '%TEST.HTML' to '%YOUR_FILE_NAME'
Hope this helps,
Tyson -
Multiple file upload in jsp with out using �FILE� type filed.
I have an applet that is used for multiple file selection, It allows drag and drop functionality also. The problem is once the user selects multiple files it has to get uploaded to the server. Since it�s not part of a file type component while submitting the form we won�t get the file contents.
We can use multipart api for uploading files, but if the file selected by the user is not by the file type filed the file contents won�t come as part in the jsp submission and I can�t assign the file names selected by the user through the applet to any FILE (hidden ) type in jsp .
Please give a solution�We can use multipart api for uploading files, but if the file selected by the user is not by the file type filed the file contents won’t come as part in the jsp submission and I can’t assign the file names selected by the user through the applet to any FILE (hidden ) type in jsp .Well i think thats a wrong notion which you have...
you can very well get non-file type field data & file item data from a multipart form.
Anyways,Letz checkout a simple example(refer to the below Code-snippet down below) which can do that task for us and it uses commons-fileupload & commons-io libraries.
FileUpload.jsp
==========
<form name="sampleForm" action="uploadAction" method="POST" enctype="multipart/form-data">
File Name 1: <input type="text" name="fileName1" size="5" /> <br/>
File: <input type="file" name="file1" id="file1" /> <br/>
File Name 2: <input type="text" name="fileName2" size="5" /> <br/>
File: <input type="file" name="file2" id="file2" /> <br/>
File Name 3: <input type="text" name="fileName3" size="5" /> <br/>
File: <input type="file" name="file3" id="file3"/> <br/>
File Name 4: <input type="text" name="fileName4" size="5" /> <br/>
File: <input type="file" name="file4" id="file4"/> <br/>
<input type="submit" value="upload"/>
</form>uploadAction method in (backingBean) :
==============================
public void uploadAction(HttpServletRequest request,HttpServletResponse response)throws Exception{
FileUploadUtils fuu = new FileUploadUtils(request);
Map<String,FileItem> fileFields = fuu.getFileFiledsMap();
Map<String,String> nonfileFields = fuu.getNonFileFiledsMap();
String fileName1 = nonfileFields.get("fileName1");
FileItem file1 = fileFields.get("file1");
byte file1ContentBuffer[] = file1.get();
String file1ContentType = file1.getContentType();
InputStream file1ins = file1.getInputStream();
file1.write(file1Name);
String fileName2 = nonfileFields.get("fileName2");
FileItem file2 = fileFields.get("file2");
byte file2ContentBuffer[] = file2.get();
String file2ContentType = file2.getContentType();
InputStream file2ins = file2.getInputStream();
file2.write(file2Name);
}FileUploadUtils.java:
===============
import java.io.File;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.DiskFileUpload;
import org.apache.commons.fileupload.FileItem;
import com.gehcsr.utils.dao.DbQueryUtils;
public class FileUploadUtils {
private Map<String,FileItem> fileItemMap = null;
private Map<String,String> nFileItemMap = null;
private HttpServletRequest request = null;
public FileUploadUtils(HttpServletRequest request)throws Exception{
this.request = request;
this.fileItemMap = new HashMap<String,FileItem>();
this.nFileItemMap = new HashMap<String,String>();
this.init();
private void init() throws Exception{
DiskFileUpload dfu = null;
List fileItems = null;
try{
dfu = new DiskFileUpload();
dfu.setSizeMax(1000000);
dfu.setSizeThreshold(4096);
dfu.setRepositoryPath(System.getProperty(java.io.tmpdir));
fileItems = dfu.parseRequest(this.request);
if(dfu.isMultipartContent && fileItems != null){
Iterator iter = fileItems.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();
String fieldName = item.getFieldName();
if (!item.isFormField()){
String fieldValue = item.toString();
this.nFileItemMap.put(fieldName,fieldName);
}else
this.fileItemMap.put(fieldName,item);
}catch(Exception exp){
exp.printStackTrace();
System.err.println(exp.getMessage());
throw new Exception(exp.getCause());
} finally{
fileItems = null;
dfu = null;
public Map<String,FileItem> getFileFiledsMap(){
return this.getFileFiledsMap;
public Map<String,String> getNonFileFiledsMap(){
return this.nFileItemMap;
NOTE:* Do not forget to add latest versions of commons-fileupload.jar & commons-io.jar in your classpath.You might get few warings due some issues with regards to generics please neglect them.
and it is not certain that you ought to use commons libraries for this there are many other alternative solutions available by which you can implement a similar functionality.
Hope this might help !!! if that does do not forget to assign/share duke dollars which you have promised :)
REGARDS,
RaHuL
Maybe you are looking for
-
I just purchased the new I pad mini Retina display 16 GB and have AT&T Lite. I cannot send emails. I do receive them. The message is "copy placed in outbox. Recipient rejected by the server". Who is the server?
-
Can I set multiple events at the same time to repeat on iCal?
I know I can do this by manually selecting each one of them and setting it to repeat. But it's a pain and it doesn't make sense not to be able to edit more than one event at the same time. When I want to set up my weekly schedule I do it for one week
-
Content and Structure (Error in callback).
Guys Every time I accessed the "Content and Structure" of a particular site I would an error in callback error. Tracing this back I found a particular list was / is causing the error. So googling around the general consensus seemed to suggest doing t
-
WiFi no longer able to even see wireless networks
At some point (I believe after installing an update) my iPhone is no longer able to find any wireless networks. It will just continue to "spin" on the choose a network screen and never finds any. Trust me when I say the wireless access point is worki
-
Several MM document generated by a Shipment costs doc
Hi gurus, I am trying to split a Shipment costs document into several MM document by carrier. I have a route with different stages. These stages/steps have associated different carriers (or partners). When the MM document is generated the system crea