> 
>    global iCounter = 1
>    file.allfiles(?"C:\Documents and Settings\Alex\Desktop\test",
>    ".ren(\"|\")","1","1","0")
>> The purpose is to take all the files in a structure of 
directories and
> rename each file after the value of the counter.  The script works 
but
> I have the following phenomenon:
> 
> Renaming jumps from 76 to 100
> Renaming jumps from 796 to 1000
> 
> However, the debug window shows all numbers, so there's nothing 
wrong
> with the counter.  Any ideas?
>

My guess:  after you rename the file, the system routine (which 
allfiles uses) processes the renamed file again and so your ren 
routine gets called again.

INclude the input path in the win.debug to see.

If this is the case, use listfiles instead, as it captures a full 
list of files to be made available for processing, unlike allfiles, 
which processes each file as it is enumerated by the system.






Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to