Listing directories

How to display list of directories and list of subdirectories and list of files in that folder in web browser.

Hope the below code snippet helps..
public static List<File> findFile(String fileName)
  List<File> foundFiles = new ArrayList<File>();
  for(File file:File.listRoots())
     findFile(fileName,file,foundFiles);
  return list;
private static void findFile(String fileName,File directory, List<? super File> list)
  for(File file:directory.listFiles())
     if(file.getName().equals(fileName))
        list.add(file);
     if(file.isDirectory())
        findFile(fileName,file,list);
{code}
REF: *http://en.allexperts.com/q/Java-1046/desktop-file-search-1.htm*
else where if you need a better API support you might think of looking at
*https://filesearch.dev.java.net/*
REGARDS,
RaHuL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • TFTP, Protocol does not support listing directories

    Hi everyone,
    I am trying to install patch for PI 1.4 because of the browser problem. I have downloaded the patch.
    I also have read the post https://supportforums.cisco.com/docs/DOC-26972#comment-22434 and followed the steps described.
    I created repository and try to make the tftp server's root directory into the repository, as u can see in the picture below. Is it correct? Because when I want to display the file contain in the repository, the error message shown "Protocol does not support listing directories", what does it mean?
    Thanks.

    Here's another way:::
    1)  From your PC launch a CMD Prompt
    2)  CD to the directory where the patch is installed
    3)  ftp xxx.xxx.xxx.xxx (this is the IP address of the NCS/PI server)
    4)  login as ftp-user
    5)  enter the password created during the install of NCS/PI for the ftp user account (if you don’t know it, you can change it by entering
    ncs password ftpuser ftp-user password
    6)  type bin then press return
    7)  type hash then press return
    8)  type put
    9)  login to the CLI of the NCS/PI server as an admin user
    10) type dir disk:ftp and you’ll see the file stored in the /localdisk/ftp directory on the disk
    11) if you don’t have a repo pointing to disk:ftp then create one using
         a) config t
         b) repository localftp
         c) url disk:/ftp
         d) exit
    12) type ncs stop
    13) type patch install localftp
    Note: if a PC firewall is enabled, you may have to disable it in order to get the file transfer to work

  • Java/JSP app to List Directories in a Drop Down

    Hi all! I'm a Java Newbie and have an application that was written in VB / ASP that I need to convert to Java / JSP. The app is relatively simple, however my understanding of Java is even more basic. :(
    Here's what I need... The app needs to be able to read a directory structure on the web server and populated a drop down box on a JSP with the directory names. Then when one of the directories that are in the drop down are selected, the files within that directory are listed as HTML links to the actual files.
    How do I get started?? Any sample code from people who have done this??
    Thanks!
    Teresa

    Basically what you want to do is build a vector of objects that represent directories, and each "directory" object contains a vector of files as an attribute. This is done on the server side in a Servlet.
    Then store all these objects in your session. Dynamically build your dropdown box to have an element for each directory. Use the JavaScript onSelect method to invoke another JSP that takes the number of the element selected, and displays all html links for the number that was passed in from the previous servlet.
    For some about $150 I would write the whole thing for you, but here would be the server side code that builds a recursive directory list.
    import java.io.*;
    import java.util.*;
    public class RecursiveDirectoryList {
         Vector Directories = new Vector();
         Vector Files = new Vector();
    public RecursiveDirectoryList() {
         super();
    public static void main(String[] args) {
    String directoryName; // Directory name entered by the user.
    File directory; // File object referring to the
    //directory.
    //TextIO.put("Enter a directory name: ");
    directoryName = "C:\\docs";
    directory = new File(directoryName);
    if (directory.isDirectory() == false) {
    // Program needs a directory name. Print an error message.
    if (directory.exists() == false)
    System.out.println("There is no such directory!");
    else
    System.out.println("That file is not a directory.");
    else {
    // List the contents of directory, with no indentation
    // at the top level.
    listContents( directory, "" );
    } // end main()
    static void listContents(File dir, String indent) {
    // A recursive subroutine that lists the contents of
    // the directory dir, including the contents of its
    // subdirectories to any level of nesting. It is assumed
    // that dir is in fact a directory. The indent parameter
    // is a string of blanks that is prepended to each item in
    // the listing. It grows in length with each increase in
    // the level of directory nesting.
    String[] files; // List of names of files in the directory.
    System.out.println("Directory: " + dir.getAbsolutePath());
    indent += " "; // Increase the indentation for listing the contents.
    files = dir.list();
    for (int i = 0; i < files.length; i++) {
    // If the file is a directory, list its contents
    // recursively. Otherwise, just print its name.
    File f = new File(dir, files);
    if (f.isDirectory())
    listContents(f, indent);
    else
    System.out.println("File: " + dir.getAbsolutePath() + "\\" + files[i]);
    } // end listContents()

  • Order of directories and files listed by the ls command

    Per default, the "ls" command lists directories and non-directories separately in lexicographical order.
    Is there a possibility to change that order of listing and sorting?
    For example, if I want "ls" to list my directories and files not by name but by change date +per default+ without using any additional options, what will I have to do?
    Is there a command or a setting which influcenes "ls"'s order of sorting?

    I don't think the defaults for ls can be changed as it is a compiled binary located in /bin. Besides compiling your own version of ls, one solution is to add lines such as the following to /etc/profile or (presuming you're using BASH) ~/.bash_profile and opening a new Terminal window:
    alias l="ls -l"
    alias ll="ls -la"
    I have two such lines in my own profile so that when I type "l" followed by the return key I get the output of "ls -l" and issuing "ll" gives me a listing of dot-files, too.
    Probably not exactly what you were looking for but it does simplify the command issued at the command line and avoid compiling your own.
    hth,
    Johnnie Wilcox
    aka mistersquid

  • How Can I Copy Oracle Directories

    How Can I Copy Oracle Directories to other database version (9i to 10g) with grants?
    If somebody could gave me suggestions.
    Rgds,
    Rha

    To get the script for all directories created in database
    SELECT DBMS_METADATA.GET_DDL('DIRECTORY',DIRECTORY_NAME) FROM DBA_DIRECTORIES;
    and to get the script for the Privileges on the above listed directories
    select 'GRANT ' || PRIVILEGE || ' ON ' || TABLE_NAME || ' TO ' || GRANTEE || ';'
    FROM DBA_TAB_PRIVS
    WHERE TABLE_NAME IN (SELECT DIRECTORY_NAME FROM DBA_DIRECTORIES);
    Then these scripts can be run wherever required
    Regards

  • Trying to do a simple List

    I have just inherited Siebel On Demand in my Sales Unit after Integration with another company. All my accounts and previous contact activity is held in SOD.
    I am trying to create what I thought would be a simple List but am failing miserably.
    I just want to see a list of accounts that have not had any completed contact activity in the last 3 months.
    All activity is either an appointment or a task.
    This is driving me mad please help!
    Edited by: 870163 on 04-Jul-2011 12:45

    If you can access your ftp server via any ftp client like Filezilla then you will be able to list directories via ColdFusion as well. Share the stack trace as well.
    Sample Code
    <cfftp 
         port="21"
        action = "open"
        username = "username"
        connection = "ftp"
        password = "password"
        server = "abc.xyz.com"
        stopOnError = "Yes">
    <!--- Confirmation of Open --->   
    <cfoutput> Connection Open :#cfftp.succeeded# </cfoutput>
    <p>List the files in a directory:
    <cfftp
    action = "LISTDIR"
        stopOnError = "Yes"
        name = "ListFiles"
        directory = "/"
        connection = "ftp">
        <cfdump var="#ListFiles#">
    <cfftp
    action="close"
    connection="ftp"
    stopOnError = "Yes">
            <!--- Confirmation of Close --->   
    <cfoutput> Connection Closed :#cfftp.succeeded# </cfoutput>
    HTH
    Thanks
    VJ

  • Viewing a directory in a list box

    Hi, I am new to java, so dont be to harsh.
    I am using J Builder 5.
    I wish to view a directory in a list box, when a button is pressed.
    The button should bring up a dialog box to accept user input.
    I have already created the frame and button, but I dont know how to
    get the button to display the directory in the list box.
    I would be grateful of any help.
    John.
    Here is my code so far:
    FRAME1.java
    ==========
    package coursework;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Frame1 extends JFrame {
    JPanel contentPane;
    BorderLayout borderLayout1 = new BorderLayout();
    JPanel jPanel1 = new JPanel();
    JPanel jPanel2 = new JPanel();
    JPanel jPanel3 = new JPanel();
    JPanel jPanel4 = new JPanel();
    private Button setdir, exit, notes, all, pics, movies, music;
    JButton jButton1 = new JButton();
    JButton jButton2 = new JButton();
    JButton jButton3 = new JButton();
    JButton jButton4 = new JButton();
    GridLayout gridLayout1 = new GridLayout();
    JButton jButton5 = new JButton();
    JButton jButton6 = new JButton();
    JButton jButton7 = new JButton();
    JTextArea jTextArea1 = new JTextArea();
    JScrollPane jScrollPane1 = new JScrollPane();
    /**Construct the frame*/
    public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    /**Component initialization*/
    private void jbInit() throws Exception {
    //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
    contentPane = (JPanel) this.getContentPane();
    contentPane.setLayout(borderLayout1);
    this.setForeground(Color.lightGray);
    this.setSize(new Dimension(415, 350));
    this.setTitle("Media Catalogue");
    Button jbutton1 = all;
    Button jbutton2 = pics;
    Button jbutton3 = music;
    Button jbutton4 = movies;
    Button jbutton5 = exit;
    Button jbutton6 = setdir;
    Button jbutton7 = notes;
    jButton1.setMnemonic('0');
    jButton1.setText("All");
    jButton2.setText("Pictures");
    jButton3.setText("Music");
    jButton4.setText("Movies");
    jButton5.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jButton5_actionPerformed(e);
    jPanel2.setLayout(gridLayout1);
    gridLayout1.setRows(4);
    gridLayout1.setColumns(1);
    gridLayout1.setHgap(8);
    gridLayout1.setVgap(2);
    jButton5.setText("Exit");
    jButton6.setText("Set Root Directory");
    jButton7.setText("View Notes");
    jTextArea1.setBackground(UIManager.getColor("text"));
    jTextArea1.setText("Multi Media Catalogue");
    contentPane.add(jPanel2, BorderLayout.EAST);
    jPanel2.add(jButton4, null);
    jPanel2.add(jButton3, null);
    jPanel2.add(jButton2, null);
    jPanel2.add(jButton1, null);
    contentPane.add(jPanel3, BorderLayout.SOUTH);
    jPanel3.add(jButton5, null);
    jPanel3.add(jButton6, null);
    jPanel3.add(jButton7, null);
    contentPane.add(jPanel4, BorderLayout.WEST);
    contentPane.add(jPanel1, BorderLayout.NORTH);
    jPanel1.add(jTextArea1, null);
    contentPane.add(jScrollPane1, BorderLayout.CENTER);
    jButton6.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jButton6_actionPerformed(e);
    /**Overridden so we can exit when window is closed*/
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    void jButton5_actionPerformed(ActionEvent e) {
    System.exit(0);
    void jButton6_actionPerformed(ActionEvent e) {
    APPLICATION1.java
    =================
    package coursework;
    import javax.swing.UIManager;
    import java.awt.*;
    public class Application1 {
    boolean packFrame = false;
    /**Construct the application*/
    public Application1() {
    Frame1 frame = new Frame1();
    //Validate frames that have preset sizes
    //Pack frames that have useful preferred size info, e.g. from their layout
    if (packFrame) {
    frame.pack();
    else {
    frame.validate();
    //Center the window
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = frame.getSize();
    if (frameSize.height > screenSize.height) {
    frameSize.height = screenSize.height;
    if (frameSize.width > screenSize.width) {
    frameSize.width = screenSize.width;
    frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
    frame.setVisible(true);
    /**Main method*/
    public static void main(String[] args) {
    try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    catch(Exception e) {
    e.printStackTrace();
    new Application1();
    }

    I am not quite sure if this is what you are looking for, but I was doing stuff with listing directories a while ago, and this is how I did it.
    When the user changed directory on the GUI, I called a function called listDirectory(), which changed the contents of a JTable to be the details of the files in that directory, the following is the listDirectory function:
    private void listDirectory()
    File flDirectory = new File(strWorkingDir);
    ExtensionFilter udtAllowedFiles = new ExtensionFilter("*.*");
    udtAllowedFiles.setConstraints(ExtensionFilter.FILES_ONLY);
    String [] strListFiles = flDirectory.list(udtAllowedFiles);
    strDirContents = new String[strListFiles.length][3];
    Vector vctCheckedOutFiles = udtParent.getLockedFiles(strWorkingDir);
    for(int i=0; i<strListFiles.length; i++)
    /*add the file information to the strDirContents array*/
    jtlListing.setModel(new DefaultTableModel(
    strDirContents,
    new String [] {"Name", "Type", "Last Modified"}
    Note, the ExtensionFilter implements the class FilenameFilter.
    You should be able to use a JList instead of the JTable, if that is what you need.
    Any other questions, or if this doesn't answer your query, let me know,
    S

  • Listing of the directory by Ant script

    can we list directories of drives like c , d etc by Ant script.
    If yes, please provide me the ant script code snippet.
    Thanks

    You can implement your own ANT tasks to do basically anything you want.
    http://ant.apache.org/manual/develop.html
    Something like this:
    package anttasks;
    import java.io.File;
    public class DirListTask extends org.apache.tools.ant.Task
        private File dir;
        public void setDirectory(File dir)
             this.dir = dir;
        public void execute()
              throws org.apache.tools.ant.BuildException
             if(dir == null){
                  throw new org.apache.tools.ant.BuildException("\"directory\" property is required!");
             File[] listing = dir.listFiles();
             if(listing != null){
                  for(int i = 0; i < listing.length; i++){
                       System.out.println(listing.getName());
    (typed without checking it... might contain typo mistakes)
    In your ant script you can invoke your task like this:
    <taskdef name="listtask" classname="anttasks.DirListTask"/>
    <listtask directory="c:/"/>(the ant.jar needs to be in your classpath when compiling the task and the anttasks package needs to be in the classpath when running the script).

  • Window list

    hi
    my problem is that i want to get the window list in director
    means i want to know whihc applications are running and i
    want to get list of these running application window
    thx reply me fast

    Hi Lukewig,
    You are right they must be opened some where in my system,
    but the list it gives me is too long. Here i am giving you what i
    write to get window list in BuddyAPI:
    wlist = baWindowList("","", false)
    put wlist
    [395282, 395284, 4064222, 15598522, 4915774, 65688, 4129430,
    65670, 196682, 131192, 65672, 196680, 196678, 393684, 196664,
    3539406, 3998288, 5243462, 1835468, 918128, 1573928, 1115364,
    3736526, 1639216, 1704724, 2425724, 9175970, 1639010, 65676,
    .............., 65674]
    After getting this list i use the following code to get the
    window captions:
    wlist = baWindowList("","", false)
    put wlist
    repeat with aWindow in wList
    if baWindowInfo(aWindow,"title")="" then next repeat
    put baWindowInfo(aWindow, "title")
    end repeat
    --Which gives me:
    [65670, 131192, 196682, 65672, 196680, 196678, 393684,
    196664, 395282, 395284, 4064222, 15598522, 4915774, 65688, 4129430,
    3539406, 3998288, 5243462, 1835468, 918128, 1573928, 1115364,
    3736526, 1639216, 1704724, 2425724, 9175970, 1639010, 65676,
    1443022, ............, 65674]
    --"SysFader"
    -- "SysFader"
    -- "SysFader"
    -- "SysFader"
    -- "list - Director MX 2004"
    -- "Buddy API"
    -- "Timer"
    -- "Helix DSWnd"
    -- "Messages.log - Notepad"
    -- "Untitled - Notepad"
    -- "CleanUp Application"
    -- "CleanUp Application"
    -- "screen-capturing"
    -- "Acrobat IEHelper"
    -- "Tooltips"
    -- "Acrobat IEHelper"
    -- "Acrobat IEHelper"
    -- "DDE Server Window"
    -- "CwndSessionMonitor"
    -- "Acrobat IEHelper"
    -- "__RNWK__DeviceEventNotification_WindowName_wmdm_device"
    -- "HXEngineCommInternal"
    -- "MessageBouncer"
    -- "Acrobat IEHelper"
    -- "Notification Wnd for RNAdmin"
    -- "MSNUnnamedWindow"
    -- "MSNUnnamedWindow"
    -- "MSNUnnamedWindow"
    -- "MSNUnnamedWindow"
    -- "MSNUnnamedWindow"
    -- "MSNUnnamedWindow"
    -- "MSNMSGRAbsConnWindow"
    -- "Download Accelerator Plus - DAP"
    -- "Dummy Video Parent"
    -- "MSNUnnamedWindow"
    -- "MSNUnnamedWindow"
    -- "MSNUnnamedWindow"
    -- "MSNUnnamedWindow"
    -- "MSNMSGRAbsConnWindow"
    -- "MSNUnnamedWindow"
    -- "MSNUnnamedWindow"
    -- "DDE Server Window"
    -- "MSNUnnamedWindow"
    -- "MCI command handling window"
    -- "NetscapeDispatchWnd"
    -- "XPCOM:EventReceiver"
    -- "ymsgr-tray-wnd"
    -- "VPIPCLINK"
    -- "Scan"
    -- "SMax4PNP"
    -- "SoundMax4"
    -- "ccApp"
    -- "Connections Tray"
    -- "Dialog"
    -- "DAPDownloadManager"
    -- "Power Meter"
    -- "Missing Virus Definitions"
    -- "MS_WebcheckMonitor"
    -- "Symantec AntiVirus"
    -- "InterBase Server"
    -- "InterBase Guardian"
    -- "SysFader"
    -- "Adobe - Lingo - Mozilla Firefox"
    -- "Now Playing"
    -- "RealPlayer: 01 - Chand Sifarish - ApniISP.Com"
    -- "xtras"
    -- "wndxtra"
    -- "Program Manager"
    You see, how long the list is and what if i now go to detect
    windows from my selected list, it off course will take a lot of
    memory resources.
    Well, besides this i also give a try to mcProFusion to do the
    same:
    profusion xtra result
    program=mcWindowGetList()
    put program
    -- "list - Director MX 2004
    Buddy API
    Messages.log - Notepad
    Untitled - Notepad
    Buddy API Pricing - Microsoft Internet Explorer
    Adobe - Lingo - Mozilla Firefox
    RealPlayer: 01 - Chand Sifarish - ApniISP.Com
    xtras
    wndxtra
    Program Manager
    And this is giving me a short of only those windows which are
    presently running on a user system and which a user can see as
    well.
    So, can you tell me any way to use this buddyAPI to get a
    short list of only viewable/presently running window's captions ??
    Thanks a lot anyways.
    Regards,
    Amir

  • Using bash as your file manager?

    Hello,
    My belief is that all file managers suck. There are no exceptions to this. So, for the past few months, I've been sourcing a file with a bunch of tricks I've invented / found through browsing the web to make using just bash as a file manager much more convenient.
    Here's what I currently use:
    # fm v1.9.1 by Kiah Morante
    # A very simple file manager.
    # Depends on pycp/pymv, http://github.com/yannicklm/pycp and feh
    # 'source' this file in a BASH shell
    showHidden=0 # Hidden files not shown
    showDetails=0 # ls is replaced with ls -lh if showDetails is 1
    shopt -s autocd # cd to a dir just by typing its name
    PROMPT_COMMAND='[[ ${__new_wd:=$PWD} != $PWD ]] && list; __new_wd=$PWD' # ls after cding
    # Shortcuts
    source ~/.config/fm/shortcuts # Call all custom shortcuts
    alias ..='cd ..'
    alias ...='cd ../..'
    alias ....='cd ../../..'
    alias h='cd ~'
    alias n='cd "$n"'
    # Keybindings
    bind '"\C-l":"list\C-m"'
    bind '"\C-h":"hide\C-m"'
    bind '"\C-o":"details\C-m"'
    bind '"\C-f":"makedir\C-m"'
    bind '"\C-n":"n\C-m"'
    bind '"\C-y":"cpwd\C-m"'
    bind '"\C-p":"cd "$OLDPWD"\C-m"' # Hint: You could also type '~-'
    # FM prompt appearance
    if [[ $(whoami) == 'root' ]]; then
    # So that the user knows if they have root privileges:
    PS1="\[\e[0;32\]mf\[m\e[m\] \[\e[0;31m\]root\[\e[m\] \[\e[0;34m\]\w \[\e[m\]\[\e[0;31m\]> \[\e[m\]"
    else
    PS1="\[\e[0;32\]mf\[m\e[m\] \[\e[0;34m\]\w \[\e[m\]\[\e[0;31m\]> \[\e[m\]"
    fi
    # Functions
    # Usage
    fmhelp () {
    echo "hide - toggle hidden (hidden by default)
    ls - lists contents of dir(s) passed in args.
    lsd - list directories
    cd - changed to directory \$1
    cp \$@ \$2 - copies file from \$1 to \$2
    mv \$@ \$2 - moves file from \$1 to \$2
    rm \$@ - deletes \$@
    sc \$1 \$2 - make a shortcut called \$1 pointing to \$2. If no \$2 is passed, it is evaluated as \$PWD
    cpwd - copy current working directory
    .., ..., .... - cd .. etc.
    o \$1 - opens \$1 with xdg-open
    hm - how many files are in the current directory
    details - show file details (ls -lh)
    fmhelp - this help menu
    n - Intelligent guess of the next dir you wish to cd to. Last $1 in open, list, or makedir; last argument in copy or move; pwd before a cd
    ~- - BASH shortcut for \$OLDPWD
    img - feh frontend with the following usage:
    img -t \$2 - views the dirs/images specified in \$2..\$n as clickable thumbnails
    img -s \$2 \$3 - views the images specified in \$3..\$n as a slideshow with a slide change speed of \$2 seconds
    img \$@ - views the dirs/images specified
    Shortkeys:
    Ctrl-f - mkdir
    Ctrl-h - hide
    Ctrl-l - ls
    Ctrl-n - cd \$n
    Ctrl-o - details
    Ctrl-p - cd \$OLDPWD
    Ctrl-y - cpwd
    Ctrl-u - clear line # urxvt default"
    # Toggle display hidden files
    # If $showHidden is 1, hidden files are shown
    hide () {
    showHidden=$(( 1 - $showHidden ))
    list
    # Toggle display file details
    # If $showDetails is 1, file details are shown
    details () {
    showDetails=$(( 1 - $showDetails ))
    list
    # ls
    listToggle () {
    if [[ $showHidden == 1 && $showDetails == 1 ]]; then
    ls -C --color -A -lh "$dir"
    elif [[ $showHidden == 1 && $showDetails == 0 ]]; then
    ls -C --color -A "$dir"
    elif [[ $showHidden == 0 && $showDetails == 1 ]]; then
    ls -C --color -lh "$dir"
    else
    ls -C --color "$dir"
    fi
    list () {
    clear # Unclutter the screen
    # List pwd if no $1
    if [[ $@ == "" ]]; then
    set '.'
    fi
    # List multiple folders:
    for dir in "$@"
    do
    listToggle
    done
    n="$1" # See 'n' in fmhelp
    # use feh to view thumbnails/images/slideshow
    img () {
    case "$1" in
    -t) nohup feh --thumbnails "${@:2}" --thumb-height 120 --thumb-width 120 -S filename -d --cache-thumbnails -B black > /dev/null 2>&1 & ;;
    -s) nohup feh "${@:3}" -S filename -d -B black --slideshow-delay "$2" > /dev/null 2>&1 & ;;
    *) nohup feh "$@" -S filename -d -B black > /dev/null 2>&1 & ;;
    esac
    list
    # cp
    copy () {
    if [[ $showHidden == 1 ]]; then
    pycp --interactive --all "$@"
    else
    pycp --interactive "$@"
    fi
    list
    n="${@:(-1)}" # n is the last argument (where stuff is moved to)
    # mv
    move () {
    if [[ $showHidden == 1 ]]; then
    pymv --interactive --all "$@"
    else
    pymv --interactive "$@"
    fi
    list
    n="${@:(-1)}"
    makedir () {
    if [[ $1 == "" ]]; then
    read -e n
    set "$n"
    fi
    if mkdir -- "$1"; then
    list # Update pwd to show new dir(s) that have been made.
    n="$1"
    fi
    # rm
    remove () {
    rm -rfI "$@"
    list
    # open files
    o () {
    # To use xdg-open
    #nohup xdg-open "$1" > /dev/null 2>&1 &
    if [ -f "$1" ] ; then
    case "$1" in
    *.tar.bz2) tar xjf "$1" ;;
    *.tar.gz) tar xzf "$1" ;;
    *.bz2) bunzip2 "$1" ;;
    *.rar) rar x "$1" ;;
    *.gz) gunzip "$1" ;;
    *.tar) tar xf "$1" ;;
    *.tbz2) tar xjf "$1" ;;
    *.tgz) tar xzf "$1" ;;
    *.zip) unzip "$1" ;;
    *.Z) uncompress "$1" ;;
    *.7z) 7z x "$1" ;;
    *.pdf) nohup zathura "$1" > /dev/null 2>&1 & ;;
    *.html) nohup luakit "$1" > /dev/null 2>&1 & ;;
    *.blend) nohup blender "$1" > /dev/null 2>&1 & ;;
    *.avi) nohup mplayer "$1" ;;
    *.wmv) nohup mplayer "$1" ;;
    *.rmvb) nohup mplayer "$1" ;;
    *.mp3) nohup urxvtc -si -sw -sh 30 -e mplayer "$1" > /dev/null 2>&1 & ;;
    *.flv) nohup mplayer "$1" ;;
    *.mp4) nohup mplayer "$1" ;;
    *.ogg) nohup urxvt -si -sw -sh 30 -e mplayer "$1" > /dev/null 2>&1 & ;;
    *.wav) nohup audacity "$1" > /dev/null 2>&1 & ;;
    *.jpg) img "$1" ;;
    *.jpeg) img "$1" ;;
    *.JPG) img "$1" ;;
    *.png) img "$1" ;;
    *.gif) nohup gpicview "$1" > /dev/null 2>&1 & ;;
    *) nohup urxvt -si -sw -sh 30 -e vim "$1" > /dev/null 2>&1 & ;;
    esac
    else
    echo "'$1' is not a valid file"
    fi
    n="$1"
    # Add shortcuts
    makeShortcut () {
    if [[ $2 == "" ]]; then
    set $1 .
    fi
    echo ""$1"=\""$2"\"
    alias "$1"='cd \""$2"\"'
    " >> ~/.config/fm/shortcuts
    source ~/.config/fm/shortcuts
    # Copy pwd to clipboard
    cpwd () {
    echo \"$(pwd)\" | xclip
    # List directories
    lsd () {
    ls -F "$@" | grep \/$
    # Command aliases
    alias mv="move"
    alias sc="makeShortcut"
    alias cp="copy"
    alias ls="list"
    alias rm="remove"
    alias mkdir="makedir"
    alias hm="ls -l . | egrep -c '^-'"
    list # ls when fm starts
    Could all of you fellow file manager-haters post your little tricks, whether just a few lines added to ~/.bashrc or fully fledged files that you source like mine?
    Last edited by greenmanwitch (2011-02-07 19:58:40)

    3]) wrote: once you have video files cluttered all throughout your hard drive and folders all over, thats where the 'bash' filemanager system lacks its use in terms of effectiveness.
    Actually, I found this to be one of the best advantages of using bash is that it forces a user to think about file organization and making useful naming schemes for files.
    For example, instead of having 1000+ media files in one directory I subcategorize theme by genre or whatever, and then probably subcategorize them again.
    Then I usually rename the files to something meaningful, like if I have 50 pictures of my kids birthday, just do a for each loop on the directory and rename all the files donovan_birthdayX.jpg where X is an integer incrementation.
    essentially. just don't "have files cluttered all throughout you hard drive and folders all over". and your life will be much happier regardless of how you manage your files.

  • Adobe Creative Cloud app, Mac OSX, "The Creative Cloud installation is no longer functioning..."

    OS: 10.9.4
    For about 2+ weeks I've been getting the following message in the Creative Cloud App:
    Download Error
    The Creative Cloud installation is no longer working
    uninstall and download again from http...
    I've searched through various discussions and followed every suggestion I had come across, including:
    Uninstalled/reinstalled Creative Cloud
    Renamed files in the following directories:
    ~/Library/Applications support/Adobe/OOBE
    /Library/Applications support/Adobe/OOBE
    ~/Library/Applications support/Adobe/AAMUpdater
    /Library/Applications support/Adobe/AAMUpdater
    Deleted files in above-listed directories.
    Checked all network settings including proxy, DNS, etc.
    Logged in as myself, I launched Creative Cloud as root (sudo /path/to/app)
    Between each step I uninstalled/reinstalled the Creative Cloud app. The logs (in ~/Library/Logs/) don't show any major issues, other than claiming that a preference file can't be read. I tried deleting all preferences related to ACC and the log continued to show the same message.
    Any suggestions outside of the standard list of fixes would be most welcome, at this point I'm ready to cancel my CC subscription, I feel Adobe made a big mistake by changing to this format. When it works, it's great, but when it doesn't it causes loss of productivity and immense frustration.

    Tried this with no success. Although, your mention of permissions led me to launching Disk Utility and repairing permissions. I then noticed my hard drive had a failing S.M.A.R.T. status. I swapped out the hard drive and restored from Time Machine backup, repaired permissions, uninstalled Creative Cloud, repaired permissions again and removed all files mentioned in my original post. I then reinstalled and: still get the same dang error! This is ridiculously frustrating.

  • Inconsistency between get-childitem -include and -exclude parameters

    Hi,
    Powershell 2.0
    Does anyone else consider this a minor design bug in the Get-ChildItem command?  
    # create dummy files
    "a","b","c" | % {$null | out-file "c:\temp\$_.txt"}
    # this "fails", returns nothing
    get-childitem c:\temp -include a*,b*
    # this "works", returns desired files
    get-childitem c:\temp\* -include a*,b*
    # this "works", excludes undesired files
    get-childitem c:\temp -exclude a*,b*
    # this "fails", excludes undesired files BUT RECURSES sub-directories
    get-childitem c:\temp\* -exclude a*,b*
    I'm writing a wrapper script around the GCI cmdlet, but the inconsistency between the two parameters is problematic.  My end user will surely just type a path for the path parameter, then wonder why -include returned nothing.  I can't unconditionally
    add an asterisk to the path parameter, since that messes up the exclude output.
    I'm just wondering why Microsoft didn't make the parameter interaction consistent???  
    # includes desired files in the specified path
    get-childitem -path c:\temp -include a*,b*
    # excludes undesired files in the specified path
    get-childitem -path c:\temp -exclude a*,b*
    # combine both options
    get-childitem -path c:\temp -include a*,b* -exclude *.log,*.tmp
    # same as above, the asterisk doesn't matter
    get-childitem -path c:\temp\* -include a*,b*
    get-childitem -path c:\temp\* -exclude a*,b*
    get-childitem -path c:\temp\* -include a*,b* -exclude *.log,*.tmp
    # same as above, but explicitly recurse if that's what you want
    get-childitem -path c:\temp\* -include a*,b* -recurse
    get-childitem -path c:\temp\* -exclude a*,b* -recurse
    get-childitem -path c:\temp\* -include a*,b* -exclude *.log,*tmp -recurse
    If I execute the "naked" get-childitem command, the asterisk doesn't matter...
    # same results
    get-childitem c:\temp
    get-chileitem c:\temp\*
    If this isn't considered a bug, can you explain why the inconsistency between the two parameters when combined with the -path parameter?
    Thanks,
    Scott

    The Get-ChildItem cmdlet syntax is horrific for advanced use. It's not a bug in the classic sense, so you shouldn't call it that. However, feel free to call it awful, ugly, disastrous, or any other deprecatory adjective you like - it really is
    nasty.
    Get-ChildItem's unusual behavior is rooted in one of the more 'intense' dialogues between developers and users in the beta period. Here's how I recall it working out; some details are a bit fuzzy for me at this point.
    Get-ChildItem's original design was as a tool for enumerating items in a namespace -
    similar to but not equivalent to dir and
    ls. The syntax and usage was going to conform to standard PowerShell (Monad at the time) guidelines.
    In a nutshell, what this means is that the Path parameter would have truly just meant Path - it would not have been usable as a combination path specification and result filter, which it is now. In other words
    (1) dir c:\temp
    means you wanted to return children of the container c:\temp
    (2) dir c:\temp\*
    means you wanted to return children of all containers inside
    c:\temp. With (2), you would never get c:\tmp\a.txt returned, since a.txt is not a container.
    There are reasons that this was a good idea. The parameter names and filtering behavior was consistent with the evolving PowerShell design standards, and best of all the tool would be straightforward to stub in for use by namespace
    providers consistently.
    However, this produced a lot of heated discussion. A rational, orthogonal tool would not allow the convenience we get with the dir command for doing things like this:
    (3) dir c:\tmp\a*.txt
    Possibly more important was the "crash" factor.  It's so instinctive for admins to do things like (3) that our fingers do the typing when we list directories, and the instant failure or worse, weird, dissonant output we would get with a more pure Path
    parameter is exactly like slamming into a brick wall.
    At this point, I get a little fuzzy about the details, but I believe the Get-ChildItem syntax was settled on as a compromise that wouldn't derail people expecting files when they do (3), but would still allow more complex use.  I think that this
    is done essentially by treating all files as though they are containers for themselves. This saves a lot of pain in basic use, but introduces other pain for advanced use.
    This may shed some light on why the tool is a bit twisted, but it doesn't do a lot to help with your particular wrapping problem. You'll almost certainly need to do some more complicated things in attempting to wrap up Get-ChildItem. Can you describe some
    details of what your intent is with the wrapper? What kind of searches by what kind of users, maybe? With those details, it's likely people can point out some specific approaches that can give more consistent results.

  • Error when running report from form

    When i press on the button in form to run the report i get:
    Microsoft Visual C++ Runtime library
    Runtime Error!
    Programm C:\Oracle\DB9iDS\bin\ifweb90.exe
    abnormal program termination
    What could be the problem?

    I just installed the new patch. But now OC4J won't start -i get "-jar: illegal argument":
    C:\Program Files\Common Files\System\Mapi\1060\NT>C:\oracle\livo9iDS\jdk\bin\jav
    a -Dorg.omg.CORBA.ORBClass=com.inprise.vbroker.orb.ORB -Dorg.omg.CORBA.ORBSingle
    tonClass=com.inprise.vbroker.orb.ORB -Doracle.security.jazn.config=C:\oracle\liv
    o9iDS\j2ee\Oracle9iDS\config\jazn.xml -Doracle.home=C:\oracle\livo9iDS -DORACLE_
    HOME=C:\oracle\livo9iDS -jar C:\oracle\livo9iDS\j2ee\home\oc4j.jar -userThreads
    -config C:\oracle\livo9iDS\j2ee\Oracle9iDS\config\server.xml
    -jar: illegal argument
    usage: java [-options] class
    where options include:
    -help print out this message
    -version print out the build version
    -v -verbose turn on verbose mode
    -debug enable remote JAVA debugging
    -noasyncgc don't allow asynchronous garbage collection
    -verbosegc print a message when garbage collection occurs
    -noclassgc disable class garbage collection
    -ss<number> set the maximum native stack size for any thread
    -oss<number> set the maximum Java stack size for any thread
    -ms<number> set the initial Java heap size
    -mx<number> set the maximum Java heap size
    -classpath <directories separated by semicolons>
    list directories in which to look for classes
    -prof[:<file>] output profiling data to .\java.prof or .\<file>
    -verify verify all classes when read in
    -verifyremote verify classes read in over the network [default]
    -noverify do not verify any class
    -nojit disable JIT compiler

  • A problem regarding set up of Oracle Lite 3.6.0.2.0 on Win 95, with JDK 1.1.8 &java 2

    A problem regarding set up of Oracle Lite 3.6.0.2.0 on Win 95, with JDK 1.1.8 and Java 2 SDK ( Ver 1.3 Beta)
    After the installation of Oracle Lite 3.6.0.2.0 on a laptop (with WIN 95 OS), When I run Oracle Lite Designer from start menu, I receive following error message :
    ====================================
    Invalid class name 'FILES\ORA95_2\LITE\DESIGNER\oldes.jar;C:\PROGRAM'
    usage: java [-options] class
    where options include:
    -help print out this message
    -version print out the build version
    -v -verbose turn on verbose mode
    -debug enable remote JAVA debugging
    -noasyncgc don't allow asynchronous garbage collection
    -verbosegc print a message when garbage collection occurs
    -noclassgc disable class garbage collection
    -ss<number> set the maximum native stack size for any thread
    -oss<number> set the maximum Java stack size for any thread
    -ms<number> set the initial Java heap size
    -mx<number> set the maximum Java heap size
    -classpath <directories separated by semicolons>
    list directories in which to look for classes
    -prof[:<file>] output profiling data to .\java.prof or .\<file>
    -verify verify all classes when read in
    -verifyremote verify classes read in over the network [default]
    -noverify do not verify any class
    -nojit disable JIT compiler
    Please make sure that JDK 1.1.4 (or greater) is installed in your machine and CLASSPATH is set properly. JAVA.EXE must be in the PATH.
    ====================================
    My ORACLE_HOME is c:\program files\ora95_2 and Oracle Lite is installed under the ORACLE_HOME in LITE\DESIGNER directory.
    JDK version is 1.1.8 which is greater than 1.1.4 installed in c:\program files\jdk1.1.8, My PATH, and CLASSPATH are set in AUTOEXEC.BAT as follows:
    set CLASSPATH=c:\Progra~1\jdk1.1.8\lib\classes.zip;c:\progra~1\ora95_2\lite\classes\olite36.jar;c:\progra~1\ora95_2\lite\designer\oldes.jar;c:\progra~1\ora95_2\lite\designer\swingall.j ar
    PATH=C:\Progra~1\Ora95_2\bin;.;c:\Progra~1\jdk1.1.8\lib;c:\Progra~1\jdk1.1.8\bin;C:\Progra~1\Ora95_2\lite\Designer;C:\WIN95;C:\WIN95\COMMAND;C:\UTIL
    And, I can run JAVA.EXE from any directory on command prompt.
    With JAVA 2 SDK (ver 1.3 Beta) instead of JDK 1.1.8 I'm getting a different Error message as follows:
    =============================
    java.lang.NoClassFoundError: 'FILES\ORA95_2\LITE\DESIGNER\oldes.jar;C:\PROGRAM'
    Please make sure that JDK 1.1.4 (or greater) is installed in your machine and CLASSPATH is set properly. JAVA.EXE must be in the PATH.
    ==============================
    the PATH and CLASSPATH were set accordingly, as with JDK1.1.8, and there was no classes.zip in classpath
    also the class file or the jar file looks weird or wrapped in the error message : 'FILES\ORA95_2\LITE\DESIGNER\oldes.jar;C:\PROGRAM'
    Another interesting thing I noticed is if I run oldes.exe from Installation CD, the Oracle Lite Designer runs fine, and without error, I'm able to modify tables in the database of my laptop also.
    Could someone shade some light on what am I doing wrong here ?
    Thanks for help in advance .
    Regards
    Viral
    null

    On 07/20/2015 06:35 AM, Itzhak Hovav wrote:
    > hi
    > [snip]
    > [root@p22 eclipse]# cat eclipse.ini -startup
    > plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
    > --launcher.library
    > plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807
    >
    > -showsplash
    > org.eclipse.platform
    > --launcher.XXMaxPermSize
    > 256m
    > --launcher.defaultAction
    > openFile
    > -vmargs
    > -Xms40m
    > -Xmx512m
    > [snip]
    Try this: http://wiki.eclipse.org/Eclipse.ini. You should have read the
    sticky posts at forum's top for getting started help.

  • With Lion, Problems Accessing Shared NTFS Folders with SMB://

    We are testing a local login script that we created for our Macintosh users on Lion. It has worked fine on all OS X versions prior to 10.7. Listed below is the script that we are using. When we run the script, it now mounts a folder called "home" instead of "username" and throws an error stating that "The folder can't be opened because you don't have permissions to see its contents." I have referenced the following Apple document and it was not helpful in resolving the issue.
    The following is the share path that we are trying to mount to in the script:
    /home/username
    and the following NTFS permissions have been provided to the respectively listed directories.
    /home -- All users can Read attributes, Read extended attributes, Read permissions
    /home/username -- All users have full control of this folder
    Here is the script that we place in /usr/local/sbin:
    #!/bin/bash
    clear
    username="$(whoami)"
    IP="$(dig $HOSTNAME +short)"
    VOLUMES="/Volumes/Workarea /Volumes/$username"
    for volume in $VOLUMES ; do
        [ -d $volume ] && umount -f $volume
    done
    if [ "$username" != "adminuser" ] && [ "$username" != "setupuser" ]; then
        osascript -e "try" -e "mount volume \"smb://domain.com/Workarea\"" -e "end try"
        osascript -e "try" -e "mount volume \"smb://domain.com/home/"$username\" -e "end try"
    fi
    killall -u $username Terminal
    I am not sure what additional NTFS permissions need to be provided or if we have something that we need to edit in our script since Apple changed some of the SAMBA items in Lion.

    Cross posted to here in case there is some additional ideas that come from a different community of Apple folks.

Maybe you are looking for

  • Address Book Does Not Link to Faces, Button Grayed Out

    The import face from iPhoto button is grayed out and not active on my computer, is this new Lion feature not working or not yet acitved within Lion?  Here's a description of how the feature was supposed to work (see bold text description).  I can onl

  • HT3819 how do I tell apple tv that my appleid has changed?

    I have changed my apple ID. The apple TV still thinks the old one is in use and when I give it the new one, it says it isn't correct. I have made sure that I turned on home sharing with Itunes and have given it my correct Apple ID.

  • Cannot Open Bridge

    I just installed CS4 Extended on my MacbookPro running Snow Leopard.  The installation was flawless.  However, I cannot open Bridge.  HELP!!!!!!!!!!

  • Page Count

    I have had a couple of documents that add blank pages no matter what you change the page count to....it drives me totally craxy. Close it and open it or make a pdf and get extra pages. It is only in the body section of the document. We have cover, to

  • Event and........s sub-event?

    Hi, i'm swith definitly to iPhoto to organize all my image images shot in this last 5 yeasr.... now i have about 10k photos... Now a very easy question: Events is a very good feature and now i can organize my photo exactly how i want...by event/day !