Creating a null file

  • 10 years ago


    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

  • 10 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



  • 10 years ago



    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")



Post a reply

Enter your message below

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


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.

“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook