Movefile in Windows NT 4.0 using VB

Posted on 2005-05-05
Last Modified: 2013-11-13

I was trying to movefile using SHELL & FILESYSTEM object but Windows NT 4.0 is not allowing. Can someone please help me in coding ...

Please send me the code for Movefile in VB for Windows NT 4.0

Question by:rajbiswas
    LVL 28

    Accepted Solution


    Name "C:\Somefile.txt" as "C:\SomeOtherFile.txt"
    LVL 49

    Assisted Solution

    by:Julian Hansen
    Public Declare Function MoveFile Lib "kernel32" Alias "MoveFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String) As Long

    Dim sSource as String
    Dim sTarget as String

    sSource = "c:\somefile.txt"
    sTarget = "c:\somefile.dat"

    MoveFile sSource, sTarget

    Should do it.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
    This article will show, step by step, how to integrate R code into a R Sweave document
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now