Re: walk_dir() and full path

new topic     » goto parent     » topic index » view thread      » older message » newer message

Greg Haberek wrote:
> 
> > Is there a way to retrieve the full path for a file name supplied by
> > walk_dir()?
> 
> Your function provides 2 parameters: 'path' and 'entry'. 'path' is the
> current path, 'entry' is a dir entry (ths I'm sure you already know,
> just establishing the facts). Take the D_NAME part of entry and append
> it to path, you should have the full path.
> 
> }}}
<eucode>
> function your_func( sequence path, sequence entry )
> 
>     sequence full_path
> 
>     full_path = path &'\\' & entry[D_NAME]
> 
>     return 0  -- keep going
> end function
> </eucode>
{{{

> 
> ~Greg
> 
> 


I know the path but the program doesn't.

Starting from a directory, c:\my_root_path\, I am trying to walk down a very
deep directory tree, reading any files under sub-directories, modifying these
files, and writing them again with the same tree-path but under different root
directory: instead of c:\my_root_path\the-directory-walked-throuh I want to write
them to c:\another_root_path\the-same-sub-directory-that-was-walked-through.

The problem is that walk_dir() does not supply information about sub-directories
it is walking through.

JG

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu