PDA

View Full Version : hex (W98)



hex
05-09-2002, 09:33 PM
Hi, I'm new to this and wondering how one can move a folder using a vbs script and if the folder can also be renamed? A sample script would be most helpful. Using Windows 98.
regards,
hex

ywhw
06-26-2002, 03:39 AM
set fs = CreateObject("Scripting.FileSystemObject")
fs.MoveFolder ("sourcepath","destpath")

if sourcpath = "c:\windows"
and destpath = "c:\winnt"
then you will move and rename.

you might want to check to see if the source exists, and if the path exists... this can be important

check this link

"http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/jsmthMoveFolder.asp"