Creating a null file

  • 13 years ago

    Hi,

    this is in continuation of my earlier post about FTP. My requirement is this

    1) i will be sending 2 files with the same name but different extensions like " . btn " and " .btd" to the server thru FTP. as soon as these files reach there i want to automaticllay creat a null file with extension as ".DON" which will indicate that both the .BTN and .BTd files are avialable .

    Kindly help

  • 13 years ago

    Just out of curiousity, why does it have to be a null file ?  Is it a problem to have a 1 byte file ?

    Have you tried to use something like

    Open <filename> For Output As #1
    <assign a NULL value to a variable>
    Write #1, <variable>
    Close #1


    Regards,

    Erwin

  • 13 years ago

    hi

    thanks

    the idea is like this.

    i will have to upload thru ftp 2 files by name   mahesh.btn  and mahesh.btd  ( with extensions btd and btn). I have to create a null file with extension don to indicate the presence of these to files in the server.

    I used the following code and it worked

    Set FOBJ = CreateObject("Scripting.FileSystemObject")
    Call FOBJ.createtextfile(c:\mahesh.don")


    thanks

    mahesh

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The difference between theory and practice is smaller in theory than in practice.”