Printing file names in a folder to a file
Moderators: fgagnon, nikos, Site Mods
Printing file names in a folder to a file
Is there any way to print all of the file names (only the file names) in a folder to the 2X editor.
I can print all of the file names to the 2X editor but it has all of the files information and I just want the names. Is there any way to do this.
I can print all of the file names to the 2X editor but it has all of the files information and I just want the names. Is there any way to do this.
I think you mean by 'all of the files information' the full path of the file? This is what you get by using Copy names (Alt+C) when all files are selected. Am I right??
A way to get what you want is this:
make sure the pane the files are in is set to list mode (pane style, accessible through the context menu or the menu View|Pane style> ). Thsu you have only one column showing the names of the files. select all files (Ctrl+A) and copy the column through Ctrl+P or the menu Edit|Copy columns.
Switch to Editor2 and paste and admire the result
A way to get what you want is this:
make sure the pane the files are in is set to list mode (pane style, accessible through the context menu or the menu View|Pane style> ). Thsu you have only one column showing the names of the files. select all files (Ctrl+A) and copy the column through Ctrl+P or the menu Edit|Copy columns.
Switch to Editor2 and paste and admire the result
Dumb questions are the ones that are never asked
Still not doing what I want
When I cut and paste the files from the directory (folder) to the editor it also whoes the zise and the date modified. I don't want this, I just need the files names only.
BTW, is there any other way to pull up the editor other than using MARK - Print Selection. That is what I do now and it puts the files I've highlighted into the editor automatically.
Thanks
BTW, is there any other way to pull up the editor other than using MARK - Print Selection. That is what I do now and it puts the files I've highlighted into the editor automatically.
Thanks
Sorry jmw,
I'm still not used to the separate forums for 2xExplorer and Xplorer2
The modus operandi I described applies to X2 only. I'm sorry. Don't know how to do what you want from 2X directly.
I do know a more elaborate way. Maybe it suits your needs for now...
With the pane you want the listing for as active pane, go to the address bar and type:
where 'filemask' is optional (e.g. *.txt gives you only folder and file matching .txt at the end of the name) and you can specify any valid DOS filter for files. You can furthermore specify any option the dir command supports of course.
The '/b' in the command ensures that the resulting command prompt shows only file and directory names (I imagine the b stands for 'bare format').
You can then copy these and paste them into whatever you want (for instance Editor2).
I know its cumbersome and maybe there's someone out there who knows a (much!) simpler way?? But it does the trick using 2X [/code]
I'm still not used to the separate forums for 2xExplorer and Xplorer2
The modus operandi I described applies to X2 only. I'm sorry. Don't know how to do what you want from 2X directly.
I do know a more elaborate way. Maybe it suits your needs for now...
With the pane you want the listing for as active pane, go to the address bar and type:
Code: Select all
$ dir /b filemask
The '/b' in the command ensures that the resulting command prompt shows only file and directory names (I imagine the b stands for 'bare format').
You can then copy these and paste them into whatever you want (for instance Editor2).
I know its cumbersome and maybe there's someone out there who knows a (much!) simpler way?? But it does the trick using 2X [/code]
Dumb questions are the ones that are never asked
I finally was able to get the list I wanted using part of your suggestions.
When I used the command line $ dir *.* /b > list.txt I was thrown into a DOS window and I was in the directory I wanted to be in. So I typed in
dir *.* /b > list.txt and all of my files names were listed in list.txt which is what I wanted.
Why I was thrown into the DOS window I don't knw but I did get everything worked out.
Thanks for the help.
When I used the command line $ dir *.* /b > list.txt I was thrown into a DOS window and I was in the directory I wanted to be in. So I typed in
dir *.* /b > list.txt and all of my files names were listed in list.txt which is what I wanted.
Why I was thrown into the DOS window I don't knw but I did get everything worked out.
Thanks for the help.
The $-sign in the address bar of 2X is specifically designed to create a DOS box, so it's no surprise it appears.jmw wrote:When I used the command line $ dir *.* /b > list.txt I was thrown into a DOS window and I was in the directory I wanted to be in. So I typed in
dir *.* /b > list.txt and all of my files names were listed in list.txt which is what I wanted
You already got what you wanted in list.txt when the dos window opened the first time (you didn't check for the existence of the file I guess). Executing the second command in the dos box simple created the same file again (with the same contents).
Glad to know your problem is solved.
Dumb questions are the ones that are never asked
Now I'm puzzled
I know you have reached your goal so you probably couldn't care less why it didn't seem to work the first time, but now I'd like to know what's going on
You really should have had the list in the file 'list.txt' immediately after executing the command from the address bar! You wouldn't see anything displayed in the dos box (save the prompt), but the file should be created AND contain the list of files present in the directory you were in when issuing the command. Odds are it even contains the list.txt file name itself!
I know you have reached your goal so you probably couldn't care less why it didn't seem to work the first time, but now I'd like to know what's going on
You really should have had the list in the file 'list.txt' immediately after executing the command from the address bar! You wouldn't see anything displayed in the dos box (save the prompt), but the file should be created AND contain the list of files present in the directory you were in when issuing the command. Odds are it even contains the list.txt file name itself!
Dumb questions are the ones that are never asked
Maybe I should show you what I had in the address bar. This is it
$ C:\Program Files\Common Files\Art Plus Uninstall\*.* /b > list.txt
This command line did exactly what you said, it opened the DOS window and put the cursor right at the end of the directory name. It also created the file "list.txt" in that directory but it had nothing in it.
Perhaps I've misunderstood what the syntax should have been.
This
$ C:\Program Files\Common Files\Art Plus Uninstall\*.* /b > list.txt
This command line did exactly what you said, it opened the DOS window and put the cursor right at the end of the directory name. It also created the file "list.txt" in that directory but it had nothing in it.
Perhaps I've misunderstood what the syntax should have been.
This
Aha, now we're getting somewhere!!
The command line you use
will probably open the dos box and complain about the command. You don't specify a DOS command, but simply state a folder name. The redirection (through the '>' symbol) still takes place, but the output of the 'command' is empty, so the file list.txt will also be empty.
You should have literally used the command I specified. The 'dir' didn't mean : "type the directory name", but 'dir' is the dos command to get a directory listing (as you probably know). 2X already takes care of putting you in the right directory. In fact, if you only specify '$' on the address bar, it opens a dos box for you in the folder you have opened in the active pane. Thats what makes it so useful.
Try (exactly as shown here!) and you'll get the result you want in one go!
Let me know if it works. Then I can put my mind at ease
The command line you use
Code: Select all
$ C:\Program Files\Common Files\Art Plus Uninstall\*.* /b > list.txt
You should have literally used the command I specified. The 'dir' didn't mean : "type the directory name", but 'dir' is the dos command to get a directory listing (as you probably know). 2X already takes care of putting you in the right directory. In fact, if you only specify '$' on the address bar, it opens a dos box for you in the folder you have opened in the active pane. Thats what makes it so useful.
Try
Code: Select all
$ dir *.* /b > list.txt
Let me know if it works. Then I can put my mind at ease
Dumb questions are the ones that are never asked
That did the trick.
I thought the "dir" you kept referring to was just short hand for the drive and path I was using. Even though I used the "dir" command in the DOS window to create the good "list.txt" file I still did not think it was used in the address window of 2X.
Thanks for having the patience to stick with me until this was finally sorted out.
I thought the "dir" you kept referring to was just short hand for the drive and path I was using. Even though I used the "dir" command in the DOS window to create the good "list.txt" file I still did not think it was used in the address window of 2X.
Thanks for having the patience to stick with me until this was finally sorted out.
No worries. Now both our minds are set at ease
Now you understand the power of the address bar, I think. You can use any dos command (internal or external) in the address bar, where 2X ensures the current working directory is set to the folder you have opened in the active pane. Unfortunately doesn't work for UNC paths though (paths beginning with \\machinename\sharename...)
Now you understand the power of the address bar, I think. You can use any dos command (internal or external) in the address bar, where 2X ensures the current working directory is set to the folder you have opened in the active pane. Unfortunately doesn't work for UNC paths though (paths beginning with \\machinename\sharename...)
Dumb questions are the ones that are never asked
Quote:JRz wrote:I think you mean by 'all of the files information' the full path of the file? This is what you get by using Copy names (Alt+C) when all files are selected. Am I right??
A way to get what you want is this:
make sure the pane the files are in is set to list mode (pane style, accessible through the context menu or the menu View|Pane style> ). Thsu you have only one column showing the names of the files. select all files (Ctrl+A) and copy the column through Ctrl+P or the menu Edit|Copy columns.
Switch to Editor2 and paste and admire the result
(only the file names)
I don't think this is a 2x or x2 operation,but a seperate utility.
War is Hell
Lest We Forget.
Lest We Forget.