News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Help requested

Started by skywalker, December 15, 2005, 05:42:55 PM

Previous topic - Next topic

skywalker

What windows function would I use to copy files to other directories using wildcards. I want it to copy them even if they aren't present or update ones that are.

Thanks.

MusicalMike

Never mind, this reply was irrelivent. I feel kind of stupid right now.  :green

hutch--

In direct API code you will not get that capacity, what you have is API calls like CopyFile/Ex which will copy single files at a time from one location to the other.

The way a task like this is normally done is to write a recursive file and directory procedure that climbs up and down a directory tree and with the target, it creates a directory on the new tree as it find them in the old tree and it copies one file at a time as it finds them to the correct directory in the target tree.

I know there is a capacity to do this in VBS scripting but unless there is one of the newer API in something like a Shell library, I don't know of a tree copy API available.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

skywalker

Quote from: hutch-- on December 16, 2005, 02:04:01 PM
In direct API code you will not get that capacity, what you have is API calls like CopyFile/Ex which will copy single files at a time from one location to the other.

The way a task like this is normally done is to write a recursive file and directory procedure that climbs up and down a directory tree and with the target, it creates a directory on the new tree as it find them in the old tree and it copies one file at a time as it finds them to the correct directory in the target tree.

I know there is a capacity to do this in VBS scripting but unless there is one of the newer API in something like a Shell library, I don't know of a tree copy API available.

If I can get it to copy a single file to a hidden directory, I would be happy at this point.

Is there a shell recursive directory example I can study ?

Thanks.


farrier

skywalker,

I gave you one in the DateBack.zip

Look in the ProcessFiles proc

FindFirstFile
FindNextFile

hth,

farrier
It is a GOOD day to code!
Some assembly required!
ASM me!
With every mistake, we must surely be learning. (George...Bush)