Posts: 177
rmcellig
Joined: 04 Mar 2014
#1
I am using Openbox in Lubuntu. I want to have the ability to create a new folder from an Openbox menu. I just can't remember what the syntax is to do this. I'm using pcmanfm.
Posts: 850
fatmac
Joined: 26 Jul 2012
#2
I tend to do it at /in a terminal - mkdir <name> - quick & easy.
Posts: 177
rmcellig
Joined: 04 Mar 2014
#3
I know how to create directories in the terminal using mkdir. What I don't know is how to do the same thing in openbox menu.
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#4
do you want to specify a new directory file name everytime?

this will work, and its independent of the filemanager.

makefolder.sh

Code: Select all

#!/bin/bash

cd ~
echo"Enter New Folder Name: "
read foldername
mkdir $foldername
exit

make makefolder.sh executable and put it somewhere in the path.

launch the script from your menu with this command:

Code: Select all

x-terminal-emulator -e"makefolder.sh"
by default the script creates folders in the top level of the current users home folder, otherwise you need to specify a location directly (like /home/dolphin/music/piratesofpenzance).
Posts: 177
rmcellig
Joined: 04 Mar 2014
#5
Thanks dolphin!! I'll give that a try.