一,用readline读出全部文件,用replace替换第一行内容,写文件。
二,还是readline,写文件的时候注意把第一行跳过去就是了。
三,没有。但是如果是windows,可以这样:
shell "move c:\aaa c:\bbb"

解决方案 »

  1.   

    查找字符串可以用正则表达式(RegExp),
    高效,简洁,例子见MSDN。
    ^_^
      

  2.   

    Basic系列语言好象没有正则表达式。
    replace是VB里的正则表达式哦。:)
      

  3.   

    1、使用random方式访问文件,将文件指针定位(可能是fseek函数)到要修改的地方,然后写入新的内容。如果内容长度不一致,可能要做下面的第2条。
    2、把文件的某一行删除通常要新建一个文件(不包含要删除的内容),然后删除旧的文件;
    3、文件夹重命名可以直接用rename oldfolder newfolder,具体用法请看msdn.同样可用于文件。
      

  4.   

    baodi_z(近邻) :
    rename只适合空文件夹。
      

  5.   

    下面是我写的一个文件命名函数,能在我的程序中正常使用
    --------------------------------------------------------Public Function RenameFile(sName As String, sNewName As String, Optional bPrompt As Boolean = False) As Long
    '*************************
    '*** RenameFile(): Use Name to Rename the file(move and rename file)
    '*** sName: The old file path and name
    '    if there is not a path name(e.g. test.txt) ,
    '    search the file in the current directory.
    '*** sNewName: The new File name
    '*** Return: when success,return 0;else return the error number(non-zero)
    '*** Create on 2002-08-06 ,zdleek
    '*************************    RenameFile = 0
        If sName = "" Or sNewName = "" Then Exit Function
        
        On Error GoTo RenErr
        Name sName As sNewName  'App.Path & "\LogBackup"
        If bPrompt Then _
            MsgBox "Rename the file success.The new name is " _
                & vbCrLf & sNewName, vbInformation, "Rename File"    Exit Function
    RenErr:
        RenameFile = Err.number
        If Not bPrompt Then Exit Function
        
        MsgBox "Rename the file error(" & Err.number & "). " _
            & Err.Description, vbCritical, "Rename File"End Function