PDA

View Full Version : Folder copy excluding file


abnrange
06-15-2009, 02:20 PM
I searched the forum but could not find anything.

Is it possible to copy a folder and all its sub directories and exclude a specific file like ntuser.dat? If so, how - Is there an example somewhere?

Thanks

holtgrewe
06-15-2009, 03:00 PM
Yeah, try the search again "Copy Folder" - there were several hits out there that should get you started.

abnrange
06-15-2009, 05:35 PM
Thanks - Find this post http://www.indigorose.com/forums/showthread.php?t=27042

It does not show how to exclude a file such as ntuser.dat. Any help would be great!

holtgrewe
06-16-2009, 07:53 AM
Thanks - Find this post http://www.indigorose.com/forums/showthread.php?t=27042

It does not show how to exclude a file such as ntuser.dat. Any help would be great!

If you check this post that was included in your search:
http://www.indigorose.com/forums/showthread.php?t=6797

You should be able to exclude your file quite easily...
e.g.: if variable_name ~= ntuser.dat then...etc.

You should be able to figure it out...if you can't, post your code and someone will assist...

mwreyf1
06-16-2009, 08:47 AM
A good alternative is RoboCopy.

It is a free Microsoft command-line utility for complex file copying, with many options.

Also, the file is only 78k.

Should work just fine within AMS.

You can get it by downloading the "Windows Server 2003 Resource Kit Tools".

abnrange
06-16-2009, 09:51 AM
I will give that a try - Thanks

ovm
06-22-2009, 12:08 AM
or delete the file from destination after the copy procedure.

mario

Mikhail
06-22-2009, 01:48 AM
I searched the forum but could not find anything.

Is it possible to copy a folder and all its sub directories and exclude a specific file like ntuser.dat? If so, how - Is there an example somewhere?

Thanks

Hi! Many ways to do the same thing. Another way: use the "Find file" function to copy file by file using a filter into the callback. :yes

(if necessary, I can make an example in 25/06)

MicroByte
06-22-2009, 04:38 AM
Hi! Many ways to do the same thing. Another way: use the "Find file" function to copy file by file using a filter into the callback. :yes


thats what i would do :yes, you can make very complex file routines with AMS, no need for 3rd party tools