Both file and directory path selection

Hi,
Is it possible to select both file path and directory path from one parameter using F4?If yes how?
Thanks.
Edited by: Ginger on Oct 5, 2009 7:51 AM

>
Ginger wrote:
> No...file can be anywhere....file path selection means will have file name(c:\abc.txt) and directory selection means only select 'C:\'
> from which files can be selected.
>
> Now I want to enable both the options in one parameter path.Is it possible?
AFAIK, it is not possible.
But you can try a workaround though :-P
Make two radio-buttons:
1. Select File (rb_file)
2. Select Directory (rb_dir)
Then based on the radio-button call the respective method
IF RB_FILE = 'X'.
Call Method CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
ELSEIF RB_DIR = 'X'.
Call Method CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE
ENDIF.
BR,
Suhas

Similar Messages

  • JFileChooser - show files and directories only select directory

    I need a JFileChooser that will display directories and zip files but only allow a directory to be selected.
    basically i need to be able to select a certain directory that contains a certain zip file, so to make it easier to find i want the zip files to show up so i can find the correct directory...
    I tried...
            JFileChooser jfc = new JFileChooser();
            jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            jfc.setFileFilter(new FileFilter() {
                public boolean accept(File f) {
                    if (f.isDirectory()) {
                        return true;
                    else if (f.getName().endsWith(".zip")) {
                        return true;
                    return false;
                public String getDescription() {
                    return "testing";
            });but that only displays directories in the GUI.
    The javadoc for the setFileSelectionMode() says, "Sets the JFileChooser to allow the user to just select files, just select directories, or select both files and directories. The default is JFilesChooser.FILES_ONLY. " ....which makes you think that setting the file selection mode only alters what can be SELECTED...however it alters what is displayed as well.
    ...any ideas?
    thanks

    This should display the files of interest provided the filter is tuned to do so, and allow you to select either the file of interest or the folder... If you select the file, then folder it is contained is returned.
    JFileChooser chooser = new JFileChooser();
    chooser.setCurrentDirectory(new java.io.File("."));
    MyFileFilter filter = new MyFileFilter();
    chooser.setFileFilter(filter);
    chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
    int returnVal = chooser.showOpenDialog(this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {              
      System.out.println(chooser.getCurrentDirectory());
    }

  • FIle and directory selection

    How can u select both file and directories in a single dialog box if you are using SWT
    i know for the individual ones you use
    DirectoryDialog
    FileDialog
    but dont know which one combines then???

                   JFileChooser jfc = new JFileChooser();
                        jfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
                        jfc.showOpenDialog(new JFrame());

  • Applescript: choose file AND folder (multiple selection allowed)

    Hi all;
    is there any way to select files and folder with and apple script?
    I'm trying to write something to compress some stuff and I'd need this stuff to be both files and folders at once…
    Thank you!

    Plain AppleScript doesn't have that kind of dialog, but you can access various Cocoa methods in Snow Leopard and Lion.  In Lion, you create a Cocoa-AppleScript Applet from a template in the AppleScript Editor, where you can use AppleScriptObjC statements.  Since the script can only be run in the application and not the AppleScript Editor though, it is a little bit of a pain to troubleshoot - Shane Stanley has written an ASObjC Runner background application that can be run from the AppleScript Editor, if you wanted to check that out.
    Running the Cocoa-AppleScript template, you can use something like the following - see the NSOpenPanel Class Reference for other methods and settings:
    set defaultDirectory to POSIX path of (path to desktop) -- a place to start
    tell current application's NSOpenPanel's openPanel()
      setFloatingPanel_(true)
      setTitle_("Choose some stuff:")
      setPrompt_("Choose") -- the button name
      setDirectoryURL_(current application's NSURL's URLWithString_(defaultDirectory))
      setCanChooseFiles_(true)
      setCanChooseDirectories_(true)
      setShowsHiddenFiles_(false)
      setTreatsFilePackagesAsDirectories_(false)
      setAllowsMultipleSelection_(true)
      set theResult to it's runModal() as integer -- show the panel
      if theResult is current application's NSFileHandlingPanelCancelButton then quit -- cancel button
      set theFiles to URLs() as list
    end tell
    repeat with X from 1 to (count theFiles) -- coerce the file paths in place
      set (item X of theFiles) to (item X of theFiles)'s |path|() as text -- as POSIX file
    end repeat
    choose from list theFiles
    if result is false then quit

  • File and Directory Maintenance on OSX Server

    Are there any special considerations for using file and directory maintenance utilities such as Disk Warrior or TechTool, etc. when dealing with OSX Server, or can it be handled just like any other volume.
    We have all of our data and our user home directories on the server and I would like to run some miantenance on them.
    Thanks.

    I am no expert on disk utilities.
    Personally, I just have a separate 5G partition with a minimal OSX which I boot from once a month (or before a server update) and run Disk Repair & Repair Permissions from.
    As far as I know, there is nothing going on on the server that is not going on on a 'normal' OSX machine (at file level mode). The OSX unix offering is miles from the previous OS9 model where the likes of Norton was almost mandatory. The built-in 'periodic' scripts and disk utility 'repair' (see "man fsck" in Terminal) all run at unix level, and have done for years, even before Apple II days!
    Although I have both Disk Warrior & TechTool, I don't use them except in an 'emergency' (otherwise called: "try anything").
    I would be interested in any other comments though.
    -david

  • File and directory names with Danish characters

    I have installed the Novell Client v2.0 for Linux on my Open Suse 10.3. The Client is connecting to my Netware servers (6.0 & 6.5) without any problems...
    There is one problem... Filenames and directory names with the Danish , & (ae, oe & aa), e.g the filename bger.doc (bger = books) is shown as b. and when clicking the file the file disappears from the file list. It seems to be the same problem with the German (umlaub).
    What to do?
    /Michael

    Originally Posted by J.H.M. Dassen (Ray)
    mimo <[email protected]> wrote:
    > There is one problem... Filenames and directory names with the Danish ,
    > & (ae, oe & aa), e.g the filename bger.doc (bger = books) is shown as
    > b. and when clicking the file the file disappears from the file list. It
    > seems to be the same problem with the German (umlaub). What to do?
    As far as I know, the Novell Client for Linux expects that file and
    directory names use the UTF-8 encoding and does not support a traditional
    8-bit encoding like ISO 8859-1. Try changing the encoding of file and
    directory names to UTF-8 as described in
    SDB:Converting Files or File Names to UTF-8 Encoding - openSUSE
    HTH,
    Ray Dassen
    Technical Support Engineer, EMEA Services Center, Novell Technical Services
    Novell, Inc. Software for the Open Enterprise Software for the Open Enterprise
    Seems a good hint. When I create a folder or file from within SUSE using an "Umlaut" everything is OK and NCL 2.0 displays them correctly as they are UTF-8 formatted.
    The proposed tool is no solution: one cannot convert folders or files that one cannot see (does it work for folders at all?). Maybe a windows tool would work because one could search for all files or folders with "Umlaute" and convert them. Other options?

  • File and directory permissions

    We are running OSX 10.7 Lion on a Mac Pro 1,1 IN RAID. We are using this system als fileserver. Since last year it came to our attention that there where problems with the permissions on the files and directories (they seem corrupted). I do not mean system files but the files we stored on this server. When I look at random file permissions I get a whole list of users etc. A lot of duplicate users are there and also there are some entries in the list saying 'fetching'.
    We use the server admin tool to manage groups and users.
    This is what we have done so far:
    - Try to repair permissions through terminal (because of RAID configuration)
    - Propogate permissions through server app
    - Resetpassword trick (restart cmd+R / terminal / resetpassword)
    Can anyone tell me how to get this working 'clean' again? is there a way to reset all files according to the workgroup/user settings in the server app?

    Sounds a bit like the temp files are not being 'closed' after being written
    to or read by Labview. If you are using the advanced file vi's make sure
    that they are closed afterwards.
    If the OS assumes they are open then it will not allow deletion etc even
    outside of Labview.
    bubucis wrote in message <7kv2kl$3flk$[email protected]>...
    >Hello!
    >
    >Does anybody know how Labview deals with file and directory permission
    >locking under WinNT.
    >I have a following problem. There is a main VI running in a state machine
    >mode and it fires up a SubVI that has a bunch of SubVIs. One of these
    >SubVIs are creating a temporary directory and files that I want to delete
    >once everything is over. However I always get a file permission error when
    >trying to delete those f
    iles, also when using Explorer and trying to delete
    >those files I get a file sharing error. This happens even when main VI has
    >been stopped. How comes LabVIEW does not unlock that file and directory.
    >Rather annoying!
    >Thanks for you help.
    >
    >Reinis Kanders
    >
    >

  • Script for moving files and directory to archive

    Hi,
    I've search the web for good working script to archive my files and folder with no luck.
    do you have a script that move and preserve the structure of older files and folders that have not been accessed for X days?

    Hello, I found this quite quickly in the TechNet Gallery. It seems like it would do what you're looking to do.
    https://gallery.technet.microsoft.com/Archive-old-files-with-042f859a
    # Powershell script - move old files to an archive location.
    # Writes log files to $logpath
    # Ver 0.6
    $path = "C:\TEMP"
    $archpath = "D:\TEMP-ARCH"
    $days = "30"
    $logpath = "C:\Temp"
    $date = Get-Date -format yyyyMMddHHmm
    write-progress -activity "Archiving Data" -status "Progress:"
    If ( -not (Test-Path $archpath)) {ni $archpath -type directory}
    Get-Childitem -Path $path -recurse| Where-Object {$_.LastWriteTime -lt (get-date).AddDays(-$days)} |
    ForEach { $filename = $_.fullname
    try { Move-Item $_.FullName -destination $archpath -force -ErrorAction:SilentlyContinue
    "Successfully moved $filename to $archpath" | add-content $logpath\log-$date.txt }
    catch { "Error moving $filename: $_ " | add-content $logpath\log-$date.txt }

  • Reading files and directory from a directory

    ublic static void readFromDirectory(String dirName) {
              // stop word ArrayLists
              ArabicStop();
              EnglishStop();
              FrenchStop();
              SpanishStop();
              DutchStop();
              File dir = new File(dirName);
              if (dir.isDirectory()) {
                   String[] child = dir.list();
                   System.out.println("hi Iam here");
                   for (int i = 0; i < child.length; i++) {
                        readFromDirectory(child.toString());
              File[] files = dir.listFiles();
              if (files == null) {
                   System.out.println("There are no files in this Directory ");
              } else {
                   for (int j = 0; j < files.length; j++) {
                        String filename = files[j].toString();
                        readFile(filename);
                   if (dirName.equalsIgnoreCase("English")
                             || dirName.equalsIgnoreCase("Nonenglish")) {
                        for (int i = 0; i < a2.size(); i++) {
                             keyWord = a2.get(i).toString();
                             //System.out.println("===" + keyWord + "===" + "KeyWord");
                             for (int a = 0; a < text.size(); a++) {
                                  String t1 = text.get(a).toString();
                                  if (keyWord.equalsIgnoreCase(t1)) {
                                       count++;
                                       //System.out.println("Found at:" + files[j] + " file");
                             keyWCount = count;
                             m1.put(keyWord, keyWCount);
                             //System.out.println(m1.get(keyWord));
                             count = 0;
                   } else if (dirName.equalsIgnoreCase("Spanish")) {
                        for (int i = 0; i < a5.size(); i++) {
                             keyWord = a5.get(i).toString();
                             //System.out.println("===" + keyWord + "===" + "KeyWord");
                             for (int a = 0; a < text.size(); a++) {
                                  String t1 = text.get(a).toString();
                                  if (keyWord.equalsIgnoreCase(t1)) {
                                       count++;
                                       //System.out.println("Found at:" + files[j] + " file");
                             keyWCount = count;
                             m1.put(keyWord, keyWCount);
                             //System.out.println(m1.get(keyWord));
                             count = 0;
                        //System.out.println(m1);
                   } else if (dirName.equalsIgnoreCase("French")) {
                        for (int i = 0; i < a3.size(); i++) {
                             keyWord = a3.get(i).toString();
                             //System.out.println("===" + keyWord + "===" + "KeyWord");
                             for (int a = 0; a < text.size(); a++) {
                                  String t1 = text.get(a).toString();
                                  if (keyWord.equalsIgnoreCase(t1)) {
                                       count++;
                                       //System.out.println("Found at:" + files[j] + " file");
                             keyWCount = count;
                             m1.put(keyWord, keyWCount);
                             //System.out.println(m1.get(keyWord));
                             count = 0;
         public static void main(String[] args) {
              int countText = 0;
              int c;
              test t1 = new test();
              System.out.println("IN NON - ENGLISH DOCUMENTS - P :");
              t1.readFromDirectory("NonEnglish");
              for (int j = 0; j < text.size(); j++) {
                   if (!text.get(j).toString().equalsIgnoreCase("")) {
                        countText++;
              c = countText;
              //System.out.println(c);
              //System.out.println(text.size());
              for (int i = 0; i < a2.size(); i++) {
                   String word = a2.get(i).toString();
                   String m = (m1.get(word)).toString();
                   double x = Double.parseDouble(m);
                   System.out.println(word + ":" + (x / c) * 100 + " %");
    I wanna read text files from directory that contain - lots of other directorys... and by using this code I have error,,,
    Can anyone help me plzzz
    Edited by: Shamma on Oct 9, 2008 3:32 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    You actually have more than 1 problem: you cannot traverse directories recursively and you get a NullPointerException.
    For the first problem you might want to verify what this statement returns:
    child.toString() (I honestly don't understand why you are calling toString() on a String object, but that's not the real problem!)
    You probably expect it to be a full absolute path.
    The NullPointerException has already been pointed out by masijade.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • File Adapter Directory Path

    Hi,
    I have hot coded the directory path.
    I want to read the input directory path for fileadapter from a file(i will have a configuration file where i will set values for parameters).
    Regards
    Vishnu

    Thanks Ashish, it is helpful.
    Just one more question, I am not sure what value do I add from making physical to logical. Let's say if I have file polling read operation (not sync read), then if I configure physical path it will be hardcoded in jca wsdl file, if I configure logical it is hard coded in bpel.xml file.
    Unlike other preferences I am not able to update my logical directory in bpel.xml at run time in descripter tab. So if my input directory changes for some reason, I have to replace it (via ANT) and redeploy the process no matter what.
    Let me know if I understand it correctly.
    Vishnu,
    Please clarify which operation you are using, if you are using sync read or write, you can read your directory and file name from parameter file and pass it to adapter for reading that file. Adapter will give you content and also the name file/directory as header variable.
    If you are using polling operation, "after reading" the file adapter will provide file name and directory in header. But if you want pass the name of directory to adapter for reading the file, then I have asked similar question to Ashish.
    Regards,
    Chintan

  • I downloaded both files and it keeps saying i need a file archive of cs6, what is that and where do download it?

    I downloaded the files the 6.2 gb and the 1mb but when I try to start it up or start to extract it it says I need a archive part of cs6 master collection what is that?

    Hi riverchild
      Make sure to keep both .exe and .7z file in same folder. Then try to Run .exe file. If you are still getting any error message you may try to open .7z file using any zip extractor tool and try to install. Also make sure that the files are downloaded completely.

  • *ERROR: failed to open file " export directory path /ABAP/DATA/SAPSTR.LST

    Hello experts,
    I am doing system export.
    as per the system copy guide I follows all steps.
    when I tried for export preparation.
    I got following error in  "/tmp/sapinst_instdir/ERPEhP4/LM/COPY/DB6/EXP/CENTRAL/AS-ABAP/PREEXP/R3ldctlExport.log"
    ERROR: failed to open file "/db2/PRD/sapdata4/export_prd/ABAP/DATA/SAPSTR.LST"
    /db2/PRD/sapdata4/export_prd is my export directory.
    but I found that the "SAPSTR.LST" is not exist in the location.
    also I don't find any log regarding this error.
    how to resolve this? please guide.

    Hi Rupesh,
    In continuation of previous mail, there is keyboard problem hence spelling mistakes.
    Various possible solutions:
    Report SMIGR_CREATE_DDL has to be executed before starting export preparation.
    OR
    Download llatest kernel patch and apply them in /spmnt/<SID>/exe
    make sure download latest patch R3ldctl file and R3load from SAP Marketplace and apply them in to /sapmnt/<SID>/exe.
    Make sure export dump folder should be in local drives (in windows) or local filesystems i.e.do not  use network drives  (windows) or NFS (in case of unix).
    FInally check permission by using chmod 777 in exportdump folder in case of unix.
    Regards
    APR

  • Change partition and directory path where iTunes stores music files

    Hi
    My system partition is full, but I have 90 GB freespace on a 2nd internal HDD. I would like move my entire iTunes music library to the 2nd HDD. How do I do that? How do I configure iTunes to look there for the library and to save new music to that new path in the future?

    There is an Apple article on moving your iTunes Music folder here:
    http://docs.info.apple.com/article.html?artnum=301748

  • Standby Redo Log Files and Directory Structure in Standby Site

    Hi Guru's
    I just want to confirm, i know that if the Directory structure is different i need to mention these 2 parameter in pfile
    on primary site:
    DB_CONVERT_DATAFILE='standby','primary'
    LOG_CONVERT_DATAFILE='standby','primary'
    On secondary Site:
    DB_CONVERT_DATAFILE='primary','standby'
    LOG_CONVERT_DATAFILE='primary','standby'
    But i want to confirm this wheather i need to issue the complete path of the directory in both the above paramtere:
    like:
    DB_CONVERT_DATAFILE='/u01/oracle/app/oracle/oradata/standby','/u01/oracle/app/oracle/oradata/primary'
    LOG_CONVERT_DATAFILE='/u01/oracle/app/oracle/oradata/standby','/u01/oracle/app/oracle/oradata/primary'
    Second Confusion:-
    After transferring Redo Standby log files created on primary and taken to standby on the above mentioned directory structure and after restoring the backup of primary db alongwith the standby control file will not impact the physical standby redo log placed on the above mentioned location.
    Thanks in advance for your help

    Hello,
    Regarding your 1st question, you need to provide the complete path and not just the directory name.
    On the standby:
    db_file_name_convert='<Full path of the datafiles on primary server>','<full path of the datafiles to be stored on the standby server>';
    log_file_name_convert='<Full path of the redo logfiles on primary server>','<full path of the redo logfiles on the standby server>';
    Second Confusion:-
    After transferring Redo Standby log files created on primary and taken to standby on the above mentioned directory structure and after restoring the backup of primary db alongwith the standby control file will not impact the physical standby redo log placed on the above mentioned location.
    How are you creating the standby database ? Using RMAN duplicate or through the restore/recovery options ?
    You can create the standby redo logs later.
    Regards,
    Shivananda

  • Jar files and class path

    I have a small swing application which connects to an external database and queries something and creates a small report on the local machine. Running from the command line calling the == java MyClass works good. I would like to deploy this to two other machines. I dont want the use to run from the command line solution. I want to run it from a batch file using the jar file. But I am getting a a classpath issue ( ClassNotFoundException for the jdbc drivers ) . I signed my jar file using jarsigner too. I am not interesed in using the Web Start because there are no other security attached to this app. Only couple of people intends to use it. Running from the command line calling the app file explicitly works. In the batch file I added the setclass path too. Still it gives an exception. I added the jdbc driver jar file to the appication jar file too. Still the problem exists.
    Any ideas ?

    instead of including the JDBC driver inside your application's jar, have the two jars sit in a directory separatly and include both of them on your classpath. Or, you can even specify a manifest.mf Class-Path parameter for your application's jar file so that it automatically includes the driver's jar.

Maybe you are looking for

  • File output?

    I am trying to write a program that takes a variable, places its value in a (text) file, adds 1 to the variable, and writes the new value behind the old one in the text file (a loop that write variable number to file ... to, for example, make a list

  • How to get active programs/custom ABAP developments for past 6 months?

    All, Is there any transaction/table/program/FM to get active programs for past 6 months? Intention here is to get actively used custom ABAP developments. Regards, Sree

  • Linking 2 tables - PHP

    I have 2 tables that are linked by user_name.  They both have fields that are either yes or no.  I want to take all the "yes" and certain users from table 1.  Then take the users from that table that selected yes and compare them to table 2 and if th

  • Why is the first value missing in the Chart when I use Property Nodes to clear my Charts programatically ?

    Hello everybody, I am using Property Nodes to clear my Charts right at the beginning of the program. The Property Nodes (History) are outside a While-loop. When I connect a Chart with the counter-variable "i" inside a While-loop, the first point I se

  • RFC adppter error

    Hello, I have a problem with my soap rfc scenario. It is working as expected whn i used RWB test tool. Failing when i call web service. It is giving in the adpter. I checked Xi message and pay load is exactly same when i called web service. Can anybo