Copying file names

  • Thread starter Thread starter Brad Roth
  • Start date Start date
B

Brad Roth

I need to copy a file name to put in a database. The
copy command only seems to copy files, but I just want
the fileNAME, and can't find any info on how to do this.
I have a directory full of image files that I need to
insert into an Excel file, and it seems silly to have to
copy them manually. There MUST be a way to do this,
right?
 
Brad

Several methods to accomplish this.......I like Tushar's best.

To add a "Print Directory" feature to Explorer, go to
this KB Article.

http://support.microsoft.com/default.aspx?scid=KB;EN-US;q272623&

Or you can download Printfolder 1.2 from.....

http://no-nonsense-software.com/freeware/

I use PF 1.2 and find it to be more than adequate with custom features.

OR Go to DOS(Command) prompt and directory.
Type DIR >MYFILES.TXT

All the above create a *.TXT file which can be opened in Excel.

One more method if you want to by-pass the *.TXT file and pull directly to
Excel is to use Tushar Mehta's Excel Add-in. This allows filtering and
sorting once you have the data in Excel.

http://www.tushar-mehta.com/ scroll down to Add-ins>Directory Listing.

Download the ZIP file and un-zip to your Office\Library folder.

Gord Dibben Excel MVP
 
Greetings --

From the command prompt (Start > Run > Cmd.exe), simply change to
the desired directory and type "dir > filelist.txt" or "dir > lpt1,"
just as you used to do in DOS. Any of the switches for the DIR
command (type "dir /?") will work with this command, if you wish to
modify the output. You can then subsequently edit the resulting text
file using NotePad, WordPad, Word, etc.


Bruce Chambers
--
Help us help you:



You can have peace. Or you can have freedom. Don't ever count on
having both at once. - RAH
 
| "Brad Roth" <http://www.microsoft.com/athome/security/spam/fightspam.mspx>
| wrote in message |
| I need to copy a file name to put in a database. The
| copy command only seems to copy files, but I just want
| the fileNAME, and can't find any info on how to do this.
| I have a directory full of image files that I need to
| insert into an Excel file, and it seems silly to have to
| copy them manually. There MUST be a way to do this,
| right?

If you have Microsoft Excel then perhaps you have Microsoft
Office and have installed Microsoft Outlook and its Integrated
File Management Advanced Find component (finder.exe). If
you have then you can use it to copy the names of the files
into Excel.

To do that run Outlook, click Other or Other Shortcuts on the
Outlook Bar, click My Computer, and navigate to the "directory
full of image files". Then, if desired, you can refine the view by
selecting: [Menu bar] View | Current View | Customize
Current View.

To copy the table list of results and "insert into an Excel file":

- Click within the table list of results
- Select [Menu bar] Edit | Select All
(or keyboard command: CTRL+A)
- Use the keyboard command CTRL+C
(to copy file list of a folder)
- In Excel select [Menu bar] Edit | Paste
(or keyboard command: CTRL+V)

Note 1: You can paste into Word by choosing Edit | Paste
Special | Unformatted Text

Note 2: You can print the view of a file list directly from
finder.exe

For some more information about using finder.exe search
Microsoft Outlook Help for the following phrases (with the
quotes) and read the topics by those titles:

- "About finding items"
- "Print a view of a file list"
- "Use complex search criteria to find files"

As noted in the "About finding items" Help topic, if the option to
"Look for: Files" does not appear, the Integrated File
Management component probably was not installed during
Setup. For information about how to install components search
Microsoft Outlook Help for the topic titled: "Set up or remove
individual components"

And if you have any questions about the Microsoft Outlook
Integrated File Management Advanced Find component I
suggest that you post in the following newsgroup:

microsoft.public.outlook.general

If you read the newsgroups using a Web Browser see:

Microsoft Office Online
Office Discussion Groups Home
http://www.microsoft.com/office/community/en-us/default.mspx

If you read newsgroups using a NNTP newsreader, such
as Outlook Express, and use the msnews.microsoft.com
news server here is a link:
news://msnews.microsoft.com/microsoft.public.outlook.general
 
Back
Top