-
-
Hi
Do you have to use VB/VBA, a batch file or simple command issued from the command prompt might do the job. The batch file can be associated with a windows shortcut.
Batch file lines as follows:-
@echo off
cls
F:
cd\salesdept
dir /a:-d /b /o:n > yourfile.txt
exit
This batch file will send a directory of the files in the current directory "SalesDept" to a text file of your choice. You can create a batch file in notepad type in the above lines and save it with the file extension .Bat "Your_filename.bat". Run from the command line or associate with a windows shortcut. Type & enter "dir /?" to view all the options & switches associated with Dir. Hope this make sense and is of some use.
Kev
Last edited by saltkev; 09-27-2010 at 06:04 AM.
Reason: Update
-
Look at the MSDN documentation of the Dir function
A simple example:
dim s as string
s = Dir("F:\SalesDept\*")
while len(s) > 0
'' save s into a file
s = Dir '' get next file
Wend
"There are two ways to write error-free programs. Only the third one works."
Unknown
-
 Originally Posted by mstraf
Look at the MSDN documentation of the Dir function
A simple example:
dim s as string
s = Dir("F:\SalesDept\*")
while len(s) > 0
'' save s into a file
s = Dir '' get next file
Wend
------------------------------------------------------
Hi mstraf
Thank you for trying to help me. Appreciate that very much.
Regrading your suggestion looking at MSDN what is the URL Address ?
Regarding the sample coding, The Business Analyst reguest is to retrieve only the File Name and not the content of the file.
Last edited by Lennie; 09-27-2010 at 06:36 PM.
Cheers,
Lennie
-
 Originally Posted by Lennie
Regrading your suggestion looking at MSDN what is the URL Address ?
You should have MSDN installed in your computer, type DIR in the IDE, click on it and press F1 for help
Otherwise, you can find the documentation online:
http://msdn.microsoft.com/en-us/libr...(v=VS.60).aspx
As you can see, Dir returns the name of the file, not the content...
"There are two ways to write error-free programs. Only the third one works."
Unknown
Similar Threads
-
By Kusno in forum ASP.NET
Replies: 1
Last Post: 09-24-2007, 04:02 PM
-
Replies: 3
Last Post: 08-26-2007, 12:11 AM
-
By vstep in forum VB Classic
Replies: 2
Last Post: 07-17-2007, 09:42 PM
-
By blckspder in forum AJAX
Replies: 0
Last Post: 03-12-2007, 08:24 PM
-
Replies: 146
Last Post: 08-12-2002, 10:40 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|