x404.co.uk
http://www.x404.co.uk/forum/

List of files in Excel/Word?
http://www.x404.co.uk/forum/viewtopic.php?f=4&t=1863
Page 1 of 1

Author:  forquare1 [ Mon Jul 20, 2009 7:50 am ]
Post subject:  List of files in Excel/Word?

Hi all,

Back at work and I need a hand.
I've got a drive with a load of files and folders in. I could really do with a list which I could print out, something like this would do:
Code:
find -type d /path/to/drive > ~/file_list


Can I do that in Excel or Word? I can't use batch files as 'cmd' isn't a valid application...

Thanks very much,
Ben

Author:  jonlumb [ Mon Jul 20, 2009 8:03 am ]
Post subject:  Re: List of files in Excel/Word?

You can do that in Excel (and probably Word) using a spot of VBA.

Author:  John_Vella [ Mon Jul 20, 2009 8:05 am ]
Post subject:  Re: List of files in Excel/Word?

When you say that CMD isn't a valid application I'm assuming you mean clicking Start, Run and typing CMD?

Two questions spring to mind. What version of Windows are you using? Have you tried typing COMMAND instead of CMD?

Using a batch file would be about a billion times easier than Word or Excel, (assuming it can even be done) but let's get you a command prompt sorted out first...

Edit to add: just seen jon's post and I still say that batch files would be much easier, and more transportable.

Author:  forquare1 [ Mon Jul 20, 2009 8:06 am ]
Post subject:  Re: List of files in Excel/Word?

jonlumb wrote:
spot of VBA.


I don't suppose anyone might be able to suggest some code? It's been five years or so since I last touched VBA...

Author:  forquare1 [ Mon Jul 20, 2009 8:11 am ]
Post subject:  Re: List of files in Excel/Word?

John_Vella wrote:
When you say that CMD isn't a valid application I'm assuming you mean clicking Start, Run and typing CMD?

Two questions spring to mind. What version of Windows are you using? Have you tried typing COMMAND instead of CMD?

Using a batch file would be about a billion times easier than Word or Excel, (assuming it can even be done) but let's get you a command prompt sorted out first...

Edit to add: just seen jon's post and I still say that batch files would be much easier, and more transportable.


I'm running XP Pro SP2, however it's pretty locked down.
Running COMMAND gives me a dialog box titled "Warning"
Quote:
You are not authorized to execute the following ms-dos application.
command.com
Denied - not authorized
File Path: C:\WINDOWS\system32\


I know a batch file would be a billion zillion times easier, but seeing as I can't run it, something like Excel will have to do :(

Author:  forquare1 [ Mon Jul 20, 2009 8:31 am ]
Post subject:  Re: List of files in Excel/Word?

Well, it turns out I might be able to use CMD, I need to email the command(s) to support where they can run it and email me the results...

Just need to find out how to do that UNIX line in CMD!

Author:  forquare1 [ Mon Jul 20, 2009 8:50 am ]
Post subject:  Re: List of files in Excel/Word?

I have asked for the following to be run and emailed to me:
Code:
dir \\myserver\path\to\share /A:D /S > C:\WINDOWS\Temp\file_list_for_lavery.txt


Hopefully support can weed out any inaccuarcies, I've given them the UNIX line aswell so they can see what I want to achieve.

Fingers crossed!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/