Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving a fiel from one location to another
#7
Solved: 12 Years, 10 Months, 3 Weeks ago
Hi,

Since you are using Function and returning nothing to the function, you are getting that error.

If you use sub routine(sub) then you may not get the same error.

Here is the script i used to move a file from one location to another location. It worked fine for me.

Code:
Drivespec="D:\abc\psychology.doc"
DestFolderPath= "F:\abc\ijk"
MoveAFile Drivespec,DestFolderPath


sub MoveAFile(Drivespec,DestFolderPath)
    Dim fso
    Set fso = CreateObject("Scripting.FileSystemObject")
    fso.MoveFile Drivespec,DestFolderPath
    Set fso=nothing
End Sub

Regards,
Uday.
Reply


Messages In This Thread
RE: Moving a fiel from one location to another - by anemuday - 08-07-2008, 02:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to paste file location in QTP camillelola 0 1,928 08-09-2018, 10:54 AM
Last Post: camillelola
  Selecting file saved in a location excellentpawan 1 4,415 02-25-2014, 02:05 PM
Last Post: guin.anirban
  Copy file to network shared location sams001 0 3,430 04-03-2013, 02:10 AM
Last Post: sams001
MyBB Saving an excel file with the same name and same location after updating few columns pKrishna 1 5,359 01-04-2013, 04:40 PM
Last Post: Ankesh
  Moving QTP scripts from QC to a desktop PC adityasrinivasb 1 3,512 08-02-2011, 06:07 PM
Last Post: uma87

Forum Jump:


Users browsing this thread: 1 Guest(s)