Reply to topic  [ 7 posts ] 
List of files in Excel/Word? 
Author Message
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
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


Mon Jul 20, 2009 7:50 am
Profile WWW
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 6:44 pm
Posts: 4141
Location: Exeter
Reply with quote
You can do that in Excel (and probably Word) using a spot of VBA.

_________________
"The woman is a riddle inside a mystery wrapped in an enigma I've had sex with."


Mon Jul 20, 2009 8:03 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Fri Apr 24, 2009 7:55 am
Posts: 7935
Location: Manchester.
Reply with quote
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.

_________________
okenobi wrote:
John's hot. No denying it. But he's hardly Karen now, is he ;)

John Vella BSc (Hons), PGCE - Still the official forum prankster and crude remarker :P
Sorry :roll:
I'll behave now.
Promise ;)


Mon Jul 20, 2009 8:05 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
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...


Mon Jul 20, 2009 8:06 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
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 :(


Mon Jul 20, 2009 8:11 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
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!


Mon Jul 20, 2009 8:31 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 6:36 pm
Posts: 5150
Location: /dev/tty0
Reply with quote
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!


Mon Jul 20, 2009 8:50 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.