sorry newbie question probably. i'm trying to open an specific folder.
open each file with in the folder individually and process each one.
all the processing code has been written. i'm looking for sample code
to open the folder and start grabbing files. thanks. 7 2013
Written in notepad...but it should be pretty close to what your looking for.
Goes and gets all the available folders in a folder...
then loops thru em and gets all the files per.
=====
Dim AllFolders() As String = Directory.GetDi rectories("data dir")
Dim AvailableFiles( ) As String
Dim ArrayNum as Integer = 0
'go thru each subfolder and look for files
For ArrayNum = 0 To UBound(AllFolde rs)
AvailableFiles = _
Directory.GetFi les( AllFolders(Arra yNum), "*.txt")
'check here and loop again to add those files to some other
arraylist or something
Next
=====
Miro
<jo***********@ gmail.comwrote in message
news:11******** **************@ m7g2000cwm.goog legroups.com...
sorry newbie question probably. i'm trying to open an specific folder.
open each file with in the folder individually and process each one.
all the processing code has been written. i'm looking for sample code
to open the folder and start grabbing files. thanks.
still not quite understanding this. i want to open a known folder
(i.e. "C:\ToProcess") . inside ToProcess is about 8-10 files, each
having a different name. so, i want to check if the files are there.
then, process the files with some code i have already written. right
now i'm set up to browse to the file and click a seperate process
button.
Program: open program, press process button, and files process one by
one.
Miro wrote:
Written in notepad...but it should be pretty close to what your looking for.
Goes and gets all the available folders in a folder...
then loops thru em and gets all the files per.
=====
Dim AllFolders() As String = Directory.GetDi rectories("data dir")
Dim AvailableFiles( ) As String
Dim ArrayNum as Integer = 0
'go thru each subfolder and look for files
For ArrayNum = 0 To UBound(AllFolde rs)
AvailableFiles = _
Directory.GetFi les( AllFolders(Arra yNum), "*.txt")
'check here and loop again to add those files to some other
arraylist or something
Next
=====
Miro
<jo***********@ gmail.comwrote in message
news:11******** **************@ m7g2000cwm.goog legroups.com...
sorry newbie question probably. i'm trying to open an specific folder.
open each file with in the folder individually and process each one.
all the processing code has been written. i'm looking for sample code
to open the folder and start grabbing files. thanks.
You'll need to be more specific about "I want to process the file".
Move it, Copy it, Read it, Modify it, Delete it.
The code above will get you a list of files, you just need to modify
the search string.
Once you have a list of files, check out System.IO.FileI nfo OR
System.IO.File
I would post code too help you out, but specifics are needed.
Izzy jo***********@g mail.com wrote:
still not quite understanding this. i want to open a known folder
(i.e. "C:\ToProcess") . inside ToProcess is about 8-10 files, each
having a different name. so, i want to check if the files are there.
then, process the files with some code i have already written. right
now i'm set up to browse to the file and click a seperate process
button.
Program: open program, press process button, and files process one by
one.
Miro wrote:
Written in notepad...but it should be pretty close to what your looking for.
Goes and gets all the available folders in a folder...
then loops thru em and gets all the files per.
=====
Dim AllFolders() As String = Directory.GetDi rectories("data dir")
Dim AvailableFiles( ) As String
Dim ArrayNum as Integer = 0
'go thru each subfolder and look for files
For ArrayNum = 0 To UBound(AllFolde rs)
AvailableFiles = _
Directory.GetFi les( AllFolders(Arra yNum), "*.txt")
'check here and loop again to add those files to some other
arraylist or something
Next
=====
Miro
<jo***********@ gmail.comwrote in message
news:11******** **************@ m7g2000cwm.goog legroups.com...
sorry newbie question probably. i'm trying to open an specific folder.
open each file with in the folder individually and process each one.
all the processing code has been written. i'm looking for sample code
to open the folder and start grabbing files. thanks.
>
never had to do this before... i don't understand how the array stores
the names of the files or how to call them back in my code so that i
can loop through.
"I want to process" =
i have a section of code that already is written to process the file.
(it opens it, reads it, moves it, then deletes it.) i want to do it
with a click of a button, instead of using file browser to select a
file, using a btn command to process the file, and selecting file
browse to select another file.
i'll be happy to email code.
Izzy wrote:
You'll need to be more specific about "I want to process the file".
Move it, Copy it, Read it, Modify it, Delete it.
The code above will get you a list of files, you just need to modify
the search string.
Once you have a list of files, check out System.IO.FileI nfo OR
System.IO.File
I would post code too help you out, but specifics are needed.
Izzy jo***********@g mail.com wrote:
still not quite understanding this. i want to open a known folder
(i.e. "C:\ToProcess") . inside ToProcess is about 8-10 files, each
having a different name. so, i want to check if the files are there.
then, process the files with some code i have already written. right
now i'm set up to browse to the file and click a seperate process
button.
Program: open program, press process button, and files process one by
one.
Miro wrote:
Written in notepad...but it should be pretty close to what your looking for.
Goes and gets all the available folders in a folder...
then loops thru em and gets all the files per.
=====
Dim AllFolders() As String = Directory.GetDi rectories("data dir")
Dim AvailableFiles( ) As String
Dim ArrayNum as Integer = 0
>
'go thru each subfolder and look for files
For ArrayNum = 0 To UBound(AllFolde rs)
AvailableFiles = _
Directory.GetFi les( AllFolders(Arra yNum), "*.txt")
>
'check here and loop again to add those files to some other
arraylist or something
Next
>
=====
>
Miro
>
>
>
<jo***********@ gmail.comwrote in message
news:11******** **************@ m7g2000cwm.goog legroups.com...
sorry newbie question probably. i'm trying to open an specific folder.
open each file with in the folder individually and process each one.
all the processing code has been written. i'm looking for sample code
to open the folder and start grabbing files. thanks.
Sure send me the code. I'll write it and send it back with comments so
you'll understand what's happening.
Send the project to ir******@housto n.rr.com along with a sample file.
Izzy jo***********@g mail.com wrote:
never had to do this before... i don't understand how the array stores
the names of the files or how to call them back in my code so that i
can loop through.
"I want to process" =
i have a section of code that already is written to process the file.
(it opens it, reads it, moves it, then deletes it.) i want to do it
with a click of a button, instead of using file browser to select a
file, using a btn command to process the file, and selecting file
browse to select another file.
i'll be happy to email code.
Izzy wrote:
You'll need to be more specific about "I want to process the file".
Move it, Copy it, Read it, Modify it, Delete it.
The code above will get you a list of files, you just need to modify
the search string.
Once you have a list of files, check out System.IO.FileI nfo OR
System.IO.File
I would post code too help you out, but specifics are needed.
Izzy jo***********@g mail.com wrote:
still not quite understanding this. i want to open a known folder
(i.e. "C:\ToProcess") . inside ToProcess is about 8-10 files, each
having a different name. so, i want to check if the files are there.
then, process the files with some code i have already written. right
now i'm set up to browse to the file and click a seperate process
button.
>
Program: open program, press process button, and files process one by
one.
Miro wrote:
Written in notepad...but it should be pretty close to what your looking for.
Goes and gets all the available folders in a folder...
then loops thru em and gets all the files per.
=====
Dim AllFolders() As String = Directory.GetDi rectories("data dir")
Dim AvailableFiles( ) As String
Dim ArrayNum as Integer = 0
'go thru each subfolder and look for files
For ArrayNum = 0 To UBound(AllFolde rs)
AvailableFiles = _
Directory.GetFi les( AllFolders(Arra yNum), "*.txt")
'check here and loop again to add those files to some other
arraylist or something
Next
=====
Miro
<jo***********@ gmail.comwrote in message
news:11******** **************@ m7g2000cwm.goog legroups.com...
sorry newbie question probably. i'm trying to open an specific folder.
open each file with in the folder individually and process each one.
all the processing code has been written. i'm looking for sample code
to open the folder and start grabbing files. thanks.
>
John, try this... ( in the mean time while izzy is looking at ur code )
Plop that code I gave you into ur program,
then put a Debug.Writeline ( "put stop here" )
in the comment part i put.
Put a code stopper red dot in left hand side on it.
When the code stops here... go to the debuger and look what is in the array,
in the locals/ watch .
It took me a while when i first started ( about 1.5 months ago ) how to view
data in the debugger... it opend up a whole new world for me at the time. I
was in the same boat you were. - and probably still am for most things ;)
Miro
"Izzy" <is************ @gmail.comwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
Sure send me the code. I'll write it and send it back with comments so
you'll understand what's happening.
Send the project to ir******@housto n.rr.com along with a sample file.
Izzy jo***********@g mail.com wrote:
>never had to do this before... i don't understand how the array stores the names of the files or how to call them back in my code so that i can loop through.
"I want to process" = i have a section of code that already is written to process the file. (it opens it, reads it, moves it, then deletes it.) i want to do it with a click of a button, instead of using file browser to select a file, using a btn command to process the file, and selecting file browse to select another file.
i'll be happy to email code. Izzy wrote:
You'll need to be more specific about "I want to process the file".
Move it, Copy it, Read it, Modify it, Delete it.
The code above will get you a list of files, you just need to modify
the search string.
Once you have a list of files, check out System.IO.FileI nfo OR
System.IO.File
I would post code too help you out, but specifics are needed.
Izzy jo***********@g mail.com wrote:
still not quite understanding this. i want to open a known folder
(i.e. "C:\ToProcess") . inside ToProcess is about 8-10 files, each
having a different name. so, i want to check if the files are
there.
then, process the files with some code i have already written. right
now i'm set up to browse to the file and click a seperate process
button.
Program: open program, press process button, and files process one
by
one.
Miro wrote:
Written in notepad...but it should be pretty close to what your
looking for.
Goes and gets all the available folders in a folder...
then loops thru em and gets all the files per.
=====
Dim AllFolders() As String = Directory.GetDi rectories("data dir")
Dim AvailableFiles( ) As String
Dim ArrayNum as Integer = 0
'go thru each subfolder and look for files
For ArrayNum = 0 To UBound(AllFolde rs)
AvailableFiles = _
Directory.GetFi les( AllFolders(Arra yNum), "*.txt")
'check here and loop again to add those files to some
other
arraylist or something
Next
=====
Miro
<jo***********@ gmail.comwrote in message
news:11******** **************@ m7g2000cwm.goog legroups.com...
sorry newbie question probably. i'm trying to open an specific
folder.
open each file with in the folder individually and process each
one.
all the processing code has been written. i'm looking for sample
code
to open the folder and start grabbing files. thanks.
>
thanks. i'll try that. that's a really good piece of advice.
Miro wrote:
John, try this... ( in the mean time while izzy is looking at ur code )
Plop that code I gave you into ur program,
then put a Debug.Writeline ( "put stop here" )
in the comment part i put.
Put a code stopper red dot in left hand side on it.
When the code stops here... go to the debuger and look what is in the array,
in the locals/ watch .
It took me a while when i first started ( about 1.5 months ago ) how to view
data in the debugger... it opend up a whole new world for me at the time. I
was in the same boat you were. - and probably still am for most things ;)
Miro
"Izzy" <is************ @gmail.comwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
Sure send me the code. I'll write it and send it back with comments so
you'll understand what's happening.
Send the project to ir******@housto n.rr.com along with a sample file.
Izzy jo***********@g mail.com wrote:
never had to do this before... i don't understand how the array stores
the names of the files or how to call them back in my code so that i
can loop through.
"I want to process" =
i have a section of code that already is written to process the file.
(it opens it, reads it, moves it, then deletes it.) i want to do it
with a click of a button, instead of using file browser to select a
file, using a btn command to process the file, and selecting file
browse to select another file.
i'll be happy to email code.
Izzy wrote:
You'll need to be more specific about "I want to process the file".
Move it, Copy it, Read it, Modify it, Delete it.
The code above will get you a list of files, you just need to modify
the search string.
Once you have a list of files, check out System.IO.FileI nfo OR
System.IO.File
I would post code too help you out, but specifics are needed.
Izzy jo***********@g mail.com wrote:
still not quite understanding this. i want to open a known folder
(i.e. "C:\ToProcess") . inside ToProcess is about 8-10 files, each
having a different name. so, i want to check if the files are
there.
then, process the files with some code i have already written. right
now i'm set up to browse to the file and click a seperate process
button.
>
Program: open program, press process button, and files process one
by
one.
Miro wrote:
Written in notepad...but it should be pretty close to what your
looking for.
Goes and gets all the available folders in a folder...
then loops thru em and gets all the files per.
=====
Dim AllFolders() As String = Directory.GetDi rectories("data dir")
Dim AvailableFiles( ) As String
Dim ArrayNum as Integer = 0
'go thru each subfolder and look for files
For ArrayNum = 0 To UBound(AllFolde rs)
AvailableFiles = _
Directory.GetFi les( AllFolders(Arra yNum), "*.txt")
'check here and loop again to add those files to some
other
arraylist or something
Next
=====
Miro
<jo***********@ gmail.comwrote in message
news:11******** **************@ m7g2000cwm.goog legroups.com...
sorry newbie question probably. i'm trying to open an specific
folder.
open each file with in the folder individually and process each
one.
all the processing code has been written. i'm looking for sample
code
to open the folder and start grabbing files. thanks.
>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Éric GARANT |
last post by:
Hello everyone,
I can't open ASP documents with Windows 2000 Pro french version SP4 +
IE6.0 SP1 + IIS 5.0. When I click an ASP file, it's FrontPage 2000 that
opens it. If I choose Open With... Internet Explorer, nothing opens. And if
I can have an ASP page open in IE, if there is a link to another ASP page,
when I click it, it doesn't open that ASP link, instead IE asks if I want to
download the file. IE seems to be unable to process ASP...
|
by: Horness |
last post by:
Hi All,
We're in the process of re-writing the Intranet at work, and my javascript
knowledge could be written on the back of a post card. ;-)
Can any of you point me in the direction of some code that would enable a
form to open a specific pdf file? Details are below.
--------------------
All of our purchase orders are saved back to pdf files. Each pdf has the
|
by: Robert Scheer |
last post by:
Hi.
Is there any article that talks about the purpose of each of the
Frontpage extensions folders (_vti_cnf, _vti_pvt, _vti_script, and
_vti_txt)? When I create a new ASP.NET application, these folders are
automatically created.
Thanks,
Robert Scheer
|
by: Mike |
last post by:
Hi,
In my ASP.NET application's folder, I noticed that there are some system/IIS folders that are automatically created:
--> _vti_cnf
--> _vti_pvt
--> _vti_script
--> _vti_txt
I inherited this application, and by looking into the aforementioned folders, I noticed that "_vti_cnf" contains several of the files and subfolders (.aspx, .htm, etc.) that are also used in the project's folder itself. Some seem to be old...
|
by: hharry |
last post by:
Hello All,
I have a ListView control which displays files from a remote server.
Some ListViewItems are folders which have an undetermined number of
sub-folders.
What I need to do is programatically expand all folders/sub folders and
download the files within.
Has anybody coded a function which will loop thru a folder and all
| |
by: Joris De Groote |
last post by:
Hi,
I have a program that must look in in certain folder and take out every file
(also the files in subfolders). Now it's no problem to do this with a few
for's and if's. However, I don't know how many subfolders there will be, it
can be 1, it can be 3, but it could be 15 to. I don't want to write all
these if's and for's in each other and than still be limited with the
predefined number of folders that are coded in the for/if structure....
|
by: Per Juul Larsen |
last post by:
Hi.
My application creates empty libraries. How do I ensure that the user
copies at least one or more picture files (.jpg) in each of the empty
folders ? Result , no empty folders!
regards pjl
|
by: hharry |
last post by:
Hello All,
Does anyone know of a method to automatically detect if a file is
corrupted ?
Due to a failed backup process a number of files were corrupted. The
files are mostly .xls, .doc, .pdf. When you try to open the file, a
dialog box opens stating that the file cannot be opened.
I need to log which files wont open properly, and I'm hoping there is
a way to automate the process.
|
by: TG |
last post by:
hi!
I am working with VB 2008. I want to be able to run this program say
in N:\ and it will show me in an excel sheet the following:
Folder Path Size(GB) Count of Files
N:\Clients 0.53 308
where clients contains subfolders and files and the size is the total
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |