Ironworks Gaming Forum

Ironworks Gaming Forum (http://www.ironworksforum.com/forum/index.php)
-   General Conversation Archives (11/2000 - 01/2005) (http://www.ironworksforum.com/forum/forumdisplay.php?f=28)
-   -   Visual BASIC Questions (http://www.ironworksforum.com/forum/showthread.php?t=88114)

LennonCook 10-14-2003 02:57 AM

<span style="color: lightblue">All to do with external files -

1) Is there a way to Open a file so that it can be both read from and written to?

2) Is there any way to Open and perform processes to multiple files at once?

3) Is there a way to open a file without the user having to point directly to it, if you know the path but not the filename? (For example, to open and process every file at a certain place, with a .EG extention)

EDIT:
4) Is it possible to make a new directory or check if a directory exists?

[ 10-14-2003, 03:17 AM: Message edited by: LennonCook ]

Jorath Calar 10-14-2003 04:19 AM

I used to know how to do both 1 and 3... in VB 5... but not anymore sorry.

but here are some sites that might help...

http://www.vb-helper.com/index_files...rectories.html
http://www.vbcode.com/

Good luck! [img]smile.gif[/img]

pritchke 10-14-2003 10:56 AM

<font face="Verdana" size="3" color="#00FF00"> 1. Yes

2. I don't think threads are possible in VB. You can modify both files but process wise I think you have no choice but to modify one file, then the other. from a user prespective it would still appear to be modified at almost the same same time. You can have more than one file open at a time and do things to them.

3. This is possible

4. This is possible

I don't have time to provide examples but I may come back later to fill in some blamks if I have time.</font>

[ 10-14-2003, 11:04 AM: Message edited by: pritchke ]

LennonCook 10-20-2003 07:05 AM

<span style="color: lightblue">OK, I think I've figured out some of this myself, but I need one small bit of code for it to work properly:
How would I delete a file - as in, remove it from the allocation tables not just override it with 0 data?

Melusine 10-20-2003 07:35 AM

Wasn't yesterday your birthday Lennon? :D
(said so on Pandemonium). If so, hope you had a good one!! [img]smile.gif[/img]

Night Stalker 10-20-2003 11:14 AM

Quote:

Originally posted by LennonCook:
<span style="color: lightblue">OK, I think I've figured out some of this myself, but I need one small bit of code for it to work properly:
How would I delete a file - as in, remove it from the allocation tables not just override it with 0 data?

Depends on whether you are using a file object or not. If using an object the .delete method is available.

Otherwise del filename should work.

LennonCook 10-21-2003 02:19 AM

Quote:

Originally posted by Melusine:
Wasn't yesterday your birthday Lennon? :D
(said so on Pandemonium). If so, hope you had a good one!! [img]smile.gif[/img]

<span style="color: lightblue">Indeed it was. [img]smile.gif[/img]

Nightstalker, how would I use a file object? The only coding I've been able to find online says it's for VB6, but seems to not work (possibly it's for VB.Net?) - that is, Dim FP As New Scripting.FileSystemObject , but my version of VB doesn't seem to like that datatype somehow...

Night Stalker 10-21-2003 10:31 AM

You need to link the library for it into your project. I don't remember which library at the moment. You get there I think by right clicking on the controls tool bar, select components and then one of the tabs on that dialog box. It's been awhile and don't have a copy of VB in front of me.

ANyway, I think it's the scripting library. Sorry I can't be more specific.


All times are GMT -4. The time now is 07:02 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved