Listing files in a folder
Listing files in a folder
Is there any way to copy a list of files in a folder to the clipboard so I can, for instance, paste it into Word or whatever?
i.e. I need a command that copies the list of content of the selected folder.
Thanks
Steve
i.e. I need a command that copies the list of content of the selected folder.
Thanks
Steve
-
- Posts: 3358
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Listing files in a folder
Yes, you can select files and press "control+p" to copy all file with paths or control+shift+p to copy filenames alone. Later you can paste this in any other place.
by the way, you can automate the copy, pasting writing to text file by using a simple script. let me know if you need one.
happy XYploring!
by the way, you can automate the copy, pasting writing to text file by using a simple script. let me know if you need one.
happy XYploring!
Re: Listing files in a folder
Thanks - that's an excellent start.
It would be nice if I could just select a folder in the tree pane and do something to get a list of all the files.
i.e. without having to highlight the files first.
(I know it's trivial - I'm just idle )
Steve
It would be nice if I could just select a folder in the tree pane and do something to get a list of all the files.
i.e. without having to highlight the files first.
(I know it's trivial - I'm just idle )
Steve
-
- Posts: 3358
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Listing files in a folder
try this from menu "Scripting|Try Script":sclg wrote:Thanks - that's an excellent start.
It would be nice if I could just select a folder in the tree pane and do something to get a list of all the files.
i.e. without having to highlight the files first.
(I know it's trivial - I'm just idle )
Steve
Code: Select all
/*Write file paths to .doc file*/
focus; //focus on list
sel a; // select all files
#101; // copy file paths to clipboard
writefile ("<curpath>\ListOfFiles_<date yymmdd_hhnnss>.doc", <clipboard>);
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Listing files in a folder
Why DOC? My Word does scream for a converter when I feed it a text file called DOC.serendipity wrote:try this from menu "Scripting|Try Script":sclg wrote:Thanks - that's an excellent start.
It would be nice if I could just select a folder in the tree pane and do something to get a list of all the files.
i.e. without having to highlight the files first.
(I know it's trivial - I'm just idle )
SteveCode: Select all
/*Write file paths to .doc file*/ focus; //focus on list sel a; // select all files #101; // copy file paths to clipboard writefile ("<curpath>\ListOfFiles_<date yymmdd_hhnnss>.doc", <clipboard>);
FAQ | XY News RSS | XY Twitter
Re: Listing files in a folder
Because the OP asked for .doc in first place.admin wrote: Why DOC? My Word does scream for a converter when I feed it a text file called DOC.
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Listing files in a folder
Ah, ok. But that does not make it work better.Stefan wrote:Because the OP asked for .doc in first place.admin wrote: Why DOC? My Word does scream for a converter when I feed it a text file called DOC.
FAQ | XY News RSS | XY Twitter
-
- Posts: 3358
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Listing files in a folder
Really!! it works straight away here (WinXP laptop, Office-2007). hmm i will change to text then.admin wrote:Why DOC? My Word does scream for a converter when I feed it a text file called DOC.serendipity wrote:try this from menu "Scripting|Try Script":sclg wrote:Thanks - that's an excellent start.
It would be nice if I could just select a folder in the tree pane and do something to get a list of all the files.
i.e. without having to highlight the files first.
(I know it's trivial - I'm just idle )
SteveCode: Select all
/*Write file paths to .doc file*/ focus; //focus on list sel a; // select all files #101; // copy file paths to clipboard writefile ("<curpath>\ListOfFiles_<date yymmdd_hhnnss>.doc", <clipboard>);
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Listing files in a folder
I have only Word 2002. Don't bother. If it works for you it's ok. Word is my personal enemy so I would not be surprised if it just does not work for me.serendipity wrote:Really!! it works straight away here (WinXP laptop, Office-2007). hmm i will change to text then.admin wrote:Why DOC? My Word does scream for a converter when I feed it a text file called DOC.serendipity wrote:try this from menu "Scripting|Try Script":sclg wrote:Thanks - that's an excellent start.
It would be nice if I could just select a folder in the tree pane and do something to get a list of all the files.
i.e. without having to highlight the files first.
(I know it's trivial - I'm just idle )
SteveCode: Select all
/*Write file paths to .doc file*/ focus; //focus on list sel a; // select all files #101; // copy file paths to clipboard writefile ("<curpath>\ListOfFiles_<date yymmdd_hhnnss>.doc", <clipboard>);
FAQ | XY News RSS | XY Twitter
-
- Posts: 3358
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Listing files in a folder
@Don: But i see your point. maybe its best to post scripts that work for all, so i guess text is best
@sclg:
Because of inconsistencies with word with different versions and OS, i am posting a different script which pastes list of files to text file.
If you dont want the writing to text part, you can delete the last line "writefile ..." which will skip the writing. Files will be available on clipboard, so after you run this script, you can directly paste it into your word file.
@sclg:
Because of inconsistencies with word with different versions and OS, i am posting a different script which pastes list of files to text file.
If you dont want the writing to text part, you can delete the last line "writefile ..." which will skip the writing. Files will be available on clipboard, so after you run this script, you can directly paste it into your word file.
Code: Select all
/*Write file paths to .text file*/
focus; //focus on list
sel a; // select all files
#101; // copy file paths to clipboard
writefile ("<curpath>\ListOfFiles_<date yymmdd_hhnnss>.txt", <clipboard>);
Re: Listing files in a folder
Thanks all - yes, plain text is fine
Steve
Obviously time for me to go and investigate scripting in a bit more depth!
Steve
Obviously time for me to go and investigate scripting in a bit more depth!