Link to home
Start Free TrialLog in
Avatar of ube100
ube100Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Move the folder and the contents...

Hi,
In my VB6 application I'm generating a folder and some files within the folder in the following directory:
C:\temp\BI_2009040216002345_0001.
Now I wanted to move that BI_2009040216002345_0001 to C:\DestinationDirectory.
Once I done that delete the BI_2009040216002345_0001folder and all its contents. All this will be happening on two different machine but in the same network.
How do i achieve this in VB6?

Thanks in advance!


Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

You can move Folders with the Name Statement.

This will do it on one system.

Name "C:\temp\BI_2009040216002345_0001" as "C:\BI_2009040216002345_0001\BI_2009040216002345_0001"

You will have to use the folder Share name or Mapped drive letters for a folder that is not on the current system.

Name "C:\temp\BI_2009040216002345_0001" as "\\MyShare\BI_2009040216002345_0001\BI_2009040216002345_0001"

 or

Name "C:\temp\BI_2009040216002345_0001" as "K:\BI_2009040216002345_0001\BI_2009040216002345_0001"
Name "C:\temp\BI_2009040216002345_0001" as "C:\BI_2009040216002345_0001\BI_2009040216002345_0001"

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of ube100
ube100
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial