Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Text File Creation


O.k I need assistance in a VB program Im working On
I need to select a directory in the app and Once the directory is
selected I need my Vb to go thru All files in the Selected Directory..
And Create a text File wth all Files in the Directory Listed as the
format below

2 "L" 2 2 "Programname w/o.ext" "L$dirpath/Filenamew.ext "MAIN"




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Completion Of Output Text File Creation
Following is the scenario where I am having problem:
The program generates an output file (*.txt) and should rename it. The time taken for output file creation may vary, depending on various other factors. The program should wait till the output file is completely finished before renaming it.
How can the output file completion be known? Now, I am using Sleep function, to delay the renaming process. I know it is not a good practice to use Sleep. What is the better alternative? Though it works for lesser duration, in some cases, when output file generation takes more time than sleep time, I am getting the 'File/Path access error'. It is obvious to get this error, as the program tries to rename the output file, while it is still being written.
Any suggestions?

Directory/Text File Creation, Other Queries - Need Help :)
1) How can I create a directory and a text file in eVB? I have been trying (though unsuccessfully) to use:
    File1.Open "myfile.txt", fsModeInput DOES NOT just create the file.
Really what I am asking for, is the following:
When the form loads, it will check to see if a specific directory/file exists. If it does NOT exist, it will then create this file (but not append to it until later.)
If the file DOES exist, it will load the value into the form into a text box. My problem is getting the directory/file to create itself upon Form Load. Also, how can I make the created file/directory hidden? If you use FileSystem control, you can set the attribute as vbHidden, but not for the File control.

2) How can I do math with 5 text boxes .text values? This is what I have:
    A text box with a value (from my first question above^^), that will not change often (unless user appends text file, but the point is for the value to stay the same most times). Four other text boxes, which will have always-changing values, will add together and then subtract FROM the value from the first box. SO basically: txttotal = txtremaining - (txt1 + txt2 + txt3 + txt4) The remaining will equal the value of txttotal UNTIL a change is made in the other 4 txt boxes, or when there is a 0 value in the 4 text boxes. What function will allow me to take all of these and do math, and not put them together as a string? (Such as if I have 25 as a total, txt1 = 1, txt2 = 1, txt3 = 1, txt4 = 1 (all four equal 4) Then you subtract 25-4 to get 21. What is happening is remainingtext would equal "251111" and not "21". For the record, I have tried CInt and it doesn't work (Unless I am doing it wrong, I believe it does NOT work)

It might sound like a lot of work, and maybe it is, but any help would be appreciated. Perhaps an uploaded sample program or copy/paste of a project's coding would be sufficient if anyone takes the liberty of putting this together for me.

Thanks for your help, guys!



Edited by - JMan0948 on 6/14/2004 8:49:45 PM

Text Box Creation
I would like an example of creating a textbox from within the application (i.e. at run time)

Dynamic Creation Of Rich Text Box
Hello


Can I create RichText Box dynamically.

I want to create rtb dynamically on each tab i am creating dynamically.

Please provide me the code how to create it.

Thanking in anticipation.

Getting The File Creation Time On A Remote File Without Dl'g
I've asked this before but have not gotten it to work. I want to be able to connect to a remote ftp host and check to see if there are any files that are more than 2 weeks old. If there is, then download the file.

This seems simple enough. I can use wininet to connect to the remote ftp host but having problem listing the creation time.

I have used "GetFileTime", which requires "OpenFile", but this only works with files that are local. Can anyone help with this. Maybe I'm going about this the wrong way or using the wrong dll.

I've tried "FileTimeToLocalFileTime" and "FileTimeToSystemTime" but both seem to relate to local files and not remote files.
I don't want to have to download the file first and then check the creation date. If the file is hugh, this could take some time.

Been working on this for a week.

Paragraph Creation And Passing It's Text From The VB Form To Word Doc.
Hi,
I am new to the Creation Of Word/Excel Objects.
I am developing an application in VB. A Word Document is created at the click event of a button from the form.
I want to pass some text in the initial two paragraphs of the document while it is created. Till now I am unable to pass this text.

Please do provide your suggestions or links for this problem.
--

File Creation
if a file doesn't exist, how do u create one???

Thanks,

Bionic Donkey

File Creation Using Vb
I am creating a program tha writes an excel file. i want the user to be able to chose the file name and location. Can anyone help with some code???


Thanks

PDF File Creation
I'm about to start investigating whether or not I can create a PDF file from within VB.
Has anyone got any previous experience with this type of processing or advice on how to do it?
The end result has to be an electronic form that can be emailed to a customer for him to print off,sign and snailmail back without him being allowed to change anything on the form(can't use a Word document).
Thanks in advance for any replies.

Alan.

Help File Creation
Help!!!

How do I create a help file and call same from my vb6 project and it will look like the standard windows help file? am running on windows 98.

Anyone who has an idea or has done something like this b4 should please give me quick hints to help me out....

thanks

New File Creation
Dear team,
I am using the following code to create a new file
But it gives an Error as "bad file name or error"

VB Code:
'Stextfilename="c: est.tex"           Open STexFilename For Output As #SFileNo

I don't know why?

File Creation In VB
Hello everybody

I have to create one quiz application which reads the question from the file.the application will be on the client machine and the questions will be read from a file.now for security purpose i want that in case the user opens the file the file should not be in a readable format.can i create such kind of file in vb. if i create a bianry file will that work.plz help me

thanks
parth

Creation Of File.
VB Code:
Open account & ".acc" For Output As #1Write #1, password = " & password"Write #1, "NumChars = 1"Write #1, "charname = " & charnameWrite #1, "World     =127.0.0.1"Write #1, "WorldPort = 7171"Close #1


It works fine except that when it's saved it looks like this.

"password = wee"
"NumChars = 1"
"charname = ee"
"World =127.0.0.1"
"WorldPort = 7171"

I need to remove the "" somehow.

Also I wonder how you can check if file exist, then it doesn't overwrite.

Help File Creation
I was wondering what you guys use to create help files.

I was recently introduced to Inno Script and Inno Setup on here by a couple of people and I love it, it is what I am now packaging and deploying my software with.

However, I do not have a good or easy GUI solution to writting help files.

Anyone have any insight?

Thanks,

Jim

Help Regarding File Creation
Hai friends,
I think most of the accounting packages dont use any backend databases. Those softwares create some files with some extension for that particular software and saving its data in those files (like Tally which create files in data directory with unique extension for each new company we create). How to use VB for doing this type of work?
If possible then also tell me can we able to loop thru those data as we select, insert and delete in to relational databases?
As Iam desperate please suggest me as regards this.
Thanx and Regards
Uma.

Help File Creation?
i believe VB has a built in utility to create ur own help files...i've been looking for the last hour and i can't find it. Maybe i'm crazy but i think VB has this. any help is appreciated thnx in advance.

Help File Creation ? !
Hi

What is the most simpliest way to display a file to the user in an read-only format?

I want to create an help file/menu for the user to use the application, but I want
it to be simple and easy to use.

I think it will be just one help file for the entire application or is it easier
to do it for each form?

Suggestions? Comments? Hints?

Thanks again,

Help File Creation
I need to write a help file for a program I've written. I know how to envoke the help file, but does anyone know how to create it. Thanks!

Creation Of BMP File
Creation of BMP file ...?

File Creation
How would I go about creating this attached file during runtime? I'm want to create it and replace files with it.



Edited by - cool1 on 12/19/2003 12:22:49 AM

Creation Of ZIP File
Hi,
I have to write a code to create zip file. i will have one folder as an parameter. and then i have to zip all files inside that folder.

Can anybody tell me how to do this?
i searched for the windows APIs but cudnt get any help.

Please reply
Rekha

XML File Creation
Hello,

How to create a xml file through programming and populate data into that xml file at runtime?

Thanks & Regards,
Mythri

Help File Creation
Hi,
I am trying to create a help file for my VB application.
I am done with almost everything expect the links using which the user can navigate from one page to the other.
I would greatly appreciate if anyone can help me create these links. Please send me a code example if possible.

Thankx,
mohan

File Creation
Hi,
Can i create a program which is automatically intimated by the operating system that a particular file have been created in a specified folder, either by means of save as or copy-paste.My application should also come to know the name of the newly created file.

E.g. My application should get intimated that a file has been created in "c:myfolder".

Monitoring File Creation
gday,

how do i monitor what files a program writes/puts on my hard drive?

thanks,
-pcweirdo.

External File Creation
hi

I am creating a program that will save the contents of certain things (variables, arrays, switches etc) into an external sequential data file. That is simple enough. But now I wish to add a multi user function to the program so that a user can create another user on the program - but the problem I am having is that I want to save all of the new users information into a seperate file.

My question boils down to is there any way in which I can get VB to create a text file file (notepad) that i can then input into and then save (using my own filename)?

Any help much appreciated.

External File Creation
i am simultaneously writing several programs for college, one of which is a username password system, can anyone offer any advice on how to export a file so that several usernames and passwords can be accessed. for example, how can i set up the program to go to "login.txt" and allow any combination of the usernames and passwords to be accessed, for example, how would i write down that the username is "user" and the password is "password", insert that into a foreign file so that the program looks at said file, finds the data for the username and the password and allows the user to move on to the next stage?

Jeebob

Remote File Creation...
Ok, i bascially want to write a file on a server remotely (IE on LAN)

this code doesn't work, and i didn't expect it too, my other PC is a webserver with support for PHP MySQL and CGI....

the following code does not work, how can i correct it ?


VB Code:
On Error GoTo hellOpen "192.168.2.4ScottUploadsong.txt" For Output As #1Print #1, lblwinamp.CaptionClose #1Exit Subhell:MsgBox Err.Number & " " & Err.Description


Help ?

Help File Creation Plugin
Hi All,

I have created my help file using HTML Help Workshop, added the file to my class, indexed the class and the help file.

Now I know that it is not difficult to create a new function and the update the help files manually, but if there was a plug in for VB it sure would speed things up a lot.

If nobody knows of a plug in could someone point me in the right directions on how to create them.

Thanks

Open File After Creation
Hi

I am a little stuck with how to go about the following,

I am saving data into a new file (eg. txt file). Once the file is created I would like the file to open. However, if I have and "Open" command straight after the "New" command, VB looks for a file that hasn`t quite finished saving, and hence, nothing happens.

I would like the file to open straight after it has been created...
Any ideas???? Is there some way of checking for this?

Any help would be appreciated...

Thanks

Kelly

HELP-file Creation Program
I was just wondering. Is it possible to make a HTML-helpfile?

I have now made my application, but I need to create a helpfile for it now. Maybe somebody knows a nice program to make helpfiles. Since my boss doesn't want to pay much it would be best to have a shareware version first.

Can any of you out there help me with finding such a program. I would apriciate it.

Sorry for the grammer errors. You may correct them if you please.

Binary File Creation
I've been going through several tutorials on different methods of File Access, Text, Random, Binary, etc. I'm wanting to save the users passwords in a file that someone can't easily view. I've also seen several different methods on encryption. My first thought was that binary mode was a way to actually create, read and write to a binary file, not easily viewed in a text editor. But it seems just to be the method by which the data is writtrn and retrieved, it still being an actual text file.

Is there a way to create a file that cannot be edited or viewed easily, and the data encrypted, or do I use the Text, Random, or Binary method and encrypt and decrypt the passwords.

Any thoughts on this would be greatly appreciated.

Tmp File Creation Problem
hi everyone



i have a problem in my visual basic porgram i create
lot of tmp file in computer.

please give me suggestion for solve this problem

How To Get File's Creation Date
Hello,

If I want to obtain file's creation date, how do I go about it with the VB6 Learning Edition?

Creation Of An HTML File.
I currently have a program which creates a set of data in the worksheet Notepad what I want is for this to be done automatically. Though a MACRO!

The EXCEL file is called Cricket.xls, and the worksheet is called NOTEPAD. All I want it to create an Webpage using the data in the sheet.

Any ideas...

About 120 rows, and about 25 columns (most empty though)

Database File Creation
hi
i want to do the following. code help wud b grateful.
suppose i have a database file(example.mdb) with some tables and some records in the tables.
say its today( i mean date mm/dd/yyyy). so when i run my app i shud create a file by name mm/dd/yyyy.mdb with all the tables from the file example.mdb but "empty".
this procedure shud be repeated "everyday" when i run my app for the "first time" on that particular day

how can this be done. let me know

Samir
Skill is successfully walking a tightrope over Niagara Falls. Intelligence is not trying.

Problem In 'CAB File Creation
here problem is regarding creation of CAB file in VB application
At the end of 'package & deployment wizard', After clicking 'finish' button
error is 'error number 28 : Out of stack space'.. So any suggestions

File Creation And Timestamp Check?
I am sending calibration commands to a Agilent Instrument via VBA. After the commands are sent and the instrument responds, I want to create a file on the C: drive named something like this "Unit1_Port1_Port2_full.bin".

Later down the road, I want to check the timestamp on that .bin file to see if these calibration commands need to be sent again or not. Basically, if the .bin file exists, and is not older than 2 days, I want to skip over sending these commands again.

Any suggestions? I appreciate any help I can get.... Thanks!!

Little Endian, MIDI File Creation
I've never done anything with MIDI programming. I have played MIDI files, and have some grasp of them only from this perspective. I was hoping to produce at a minimum a capability to translate musical notes based on standard notation into MIDI data, and hopefully, play back note sequences in MIDI. I've been referred to MIDI standards, but they seem to spend some time discussing manipulation of bytes in terms of big and little endian representation. I am fairly lost. Is there any straightforward, well documented code out there that demonstrates how to transform, say, a middle C note into a MIDI output with a specific duration? The first challenge is establishing how to take a note name and turn it into MIDI data. The next is how to produce sequences of notes with whatever separators are necessary. The third, and, I hope, final one, is identifying how to package the file to tell the MIDI device to start playing, to play the specific notes indicated, and then to stop. (A fourth might be how to save all this so any MIDI device can open the file and play it back.) I'm just interested in one instrument, single track output right now. I know this is quite a bit to request, so please keep the following in mind. If you can help, wonderful. If not, please don't push yourself just to answer these questions. I know you've got better things to do. The references I've seen don't appear to include any code examples.

Thanks for any assistance.

Automatic Random File Creation
Hi:
I open a random file through my code. If the file does not exist, vb automatically creates the file. The problem is: when vb creates this file, it appears that it already has a blank record.
I automatically display this file using a grid. Due to this blank record, the first row always appears blank.
How can I prevent this from happening or displaying?
Thanks in advance.

VB - Executable File Creation Issue
Hi,

I have opened a Old VB project and modified the code.It works fine, while running it in IDE or Debug mode.
But, When I try to create a "Make exe file" it gets failed by saying
"Errors during Load.Refer frmplanner.log for details"

Logfile says,

Line 80: Cannot load control dbgPlanner.

---------------------------------------------------------------
Below is code for loading the form
' **Code START**
'-------------------------------------------------------------
Private Sub Form_Load()

Dim recPlanner As New ADODB.Recordset
Dim strPlanner As String

Dim recTag As New ADODB.Recordset
Dim strTag As String

strPlanner = "Select distinct suplancde, refdat from " + PrdComLibrary + ".SCTSUP " + _
"join " + PrdLibrary + ".referps on " + _
"refcat = '235' and refkey = suplancde " + _
"order by suplancde, refdat "


If recPlanner.State = adStateOpen Then
recPlanner.Close
End If

recPlanner.Open strPlanner, conCommon, adOpenDynamic

'Loop through each record and download the info
While Not recPlanner.EOF

dbgPlanner.AddItem recPlanner!suplancde + Chr$(9) + _
recPlanner!refdat
recPlanner.MoveNext
Wend


strTag = "Select peexttag, pentport from " + PrdComLibrary + ".sctpep " + _
"where peprime = 'W' and pestat = 'A' and peplant = '" + PlantID + "' " + _
"order by peexttag desc "


If recTag.State = adStateOpen Then
recTag.Close
End If

recTag.Open strTag, conCommon, adOpenDynamic

'Loop through each record and download the info
While Not recTag.EOF
TagComboBox.AddItem recTag!peexttag + "@" + CStr(recTag!pentport)
recTag.MoveNext
Wend


End Sub
'----------------------------------------------------------------
' **Code END**


Any help wd b great...

Thanks in Advance..

-madhi

Finding File By Creation Time
I am creating an app and I want to go through a specific directory and get the filename of the file with latest creation time. Since it can be any directory, I won't know what the filenames are or how many files are in the directory. I there a simple way to do this? Well doesn't have to be simple. Thanks

Getting Creation Date Of A File On A Server
How can I obtain the date a file was created or modified from an http server?

File Creation Completed ? *RESOLVED*
Hi !

I'm building a function that has to make sure tha a file exists ( either by an independent FTP or by itself ).

I already have it working when the file doesn't exist ( stop FTP server then get file ), but my problem arises at the point the file exists but I can't tell if it is completed or processing... I want to detect end of transfer and only after that ending ( the function ).

I've tried checking DateLastModified for change while I'm running the external FTP but it is not working.

Any clue on this ?????

Thanks in advance !

Change The File Creation Date?
Hi all,
I want to change the date/time of creation of some files. Is it possible programatically or by any other way?
Thanks in advance...
Anita

Determining File Creation Date
Hi all,
How would I go about returning the file creation date on a given file e.g. c:mcafee
ewsetup.exe???
Thanks in advance,
Ray

Word 2000 Doc File Creation
http://www.vbforums.com/showthread.php?threadid=139196

Word 2000 Doc File Creation
Hi all,

How do i createa doc file(office 2000) and send the images, text, formating the content dynamicaly with with VB. Please help me its very urgent.


Regards,

Kanaka PRasad

Simple... Get File Date Creation!
How can i get the date of when a file was modified?

Thanks in advance!

Copyright 2005-08 www.BigResource.com, All rights reserved