Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
Can i Uses repetitive loop as for, while ... with folder names
For example, I want to save the folder names of a path in array and then I loop on that variable
i uses this script
FOR Each vSubFolder in DirList(vBaseDirName)
SET vSFolder = $(vSubFolder)\*;
FOR Each vInnerFolder in DirList(vSFolder)
folder:
LOAD * INLINE [
foldername
$(vInnerFolder)
];
NEXT vInnerFolder
NEXT vSubFolder
Hi,
If I understand your requirement clearly, I feel you dont need to use the variable to do this. All you need is below script.
sub DoDir (Root)
for each Ext in 'qvw', 'qva', 'qvo', 'qvs', 'qvc', 'qvd'
for each File in filelist (Root&'\*.' &Ext)
LOAD
'$(File)' as Name,
FileSize( '$(File)' ) as Size,
FileTime( '$(File)' ) as FileTime
autogenerate 1;
next File
next Ext
for each Dir in dirlist (Root&'\*' )
call DoDir (Dir)
next Dir
end sub
call DoDir ('C:')
Regards,
Kaushik Solanki
Hi,
If I understand your requirement clearly, I feel you dont need to use the variable to do this. All you need is below script.
sub DoDir (Root)
for each Ext in 'qvw', 'qva', 'qvo', 'qvs', 'qvc', 'qvd'
for each File in filelist (Root&'\*.' &Ext)
LOAD
'$(File)' as Name,
FileSize( '$(File)' ) as Size,
FileTime( '$(File)' ) as FileTime
autogenerate 1;
next File
next Ext
for each Dir in dirlist (Root&'\*' )
call DoDir (Dir)
next Dir
end sub
call DoDir ('C:')
Regards,
Kaushik Solanki
thank you kaushik So helpful script
Pleasure.
Regards,
Kaushik Solanki