PDA

View Full Version : Folder Copy and Folder Move Actions


azmanar
02-04-2006, 09:52 AM
Hi,

How do I Move Folder into another Folder, since there is no Folder.Move action?

Is there a way to copy a whole Folder and it's content to another Folder using AMS actions?

stickck
02-04-2006, 10:12 AM
you would have to use Folder.Create() to make the folder you want and use File.Move("C:\\MyDir\\*.*", "C:\\DestDir\\", true, true, false, false, nil); to copy the files you want into the new folder. if you need to delete the old info use the File.Delete("C:\\MyDir\\MyFile.ext", false, false, false, nil);

hope that helps

chris

Daniel TM
02-04-2006, 10:13 AM
Well, you could do a File.Copy action for every file in the folder, but if the folder has a lot of files it will be a lot of work.

azmanar
02-04-2006, 10:14 AM
Chris and Daniel,

THANKS !!!!!!.........Great guys

stickck
02-04-2006, 10:16 AM
the File.Move() can move all the files in a certain folder at one time. much cleaner than the File.Copy().

Chris

Daniel TM
02-04-2006, 10:20 AM
the File.Move() can move all the files in a certain folder at one time. much cleaner than the File.Copy().

Chris
Thanks, Chris! I did not know about that.

azmanar
02-04-2006, 11:21 AM
hmmm...

Moving subfolder and sub-subfolders of a folder would be nasty.

Intrigued
02-04-2006, 07:09 PM
Hi,

How do I Move Folder into another Folder, since there is no Folder.Move action?

Is there a way to copy a whole Folder and it's content to another Folder using AMS actions?

http://indigorose.com/forums/showthread.php?t=6402&highlight=Worm+copy+folder

:yes

azmanar
02-05-2006, 12:05 AM
http://indigorose.com/forums/showthread.php?t=6402&highlight=Worm+copy+folder

:yes

Intrigue,

Thanks for the link .....! Truly helpful pointers by Worm and yourself in there.

It would be neat if AMS have Folder.Move & Folder.Copy actions.

Intrigued
02-05-2006, 02:34 AM
I hear you, agreed.