This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Bash script to extract filenames from current directory

Tags: None
(comma "," separated)
kde-bladeforce
Registered Member
Posts
16
Karma
0
Hi,

I'm trying to create a service menu that will extract the filenames from the current directory to a text file saved in the same directory but this isnt working.

The contents of my script are

#!/bin/bash

CURRENT_DIR="`cd $1; pwd`"
cd $CURRENT_DIR
kdialog --passivepopup "List Created in '($CURRENT_DIR)' Folder" 3; ls --group-directories-first --ignore "list.txt" > ./list.txt

i get a text file but not from the current open folder in dolphin and it isnt saved in that folder either.

Anybody know the problem?

Thanks


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]