(imported topic written by JamesN91)
####################################################
// get the list of the files and their paths NOT HIDDEN
parameter “outputfile1” = "{pathname of parent folder of regapp “besclient.exe”}{“Media_” & current year as string & current month as two digits & current day_of_month as two digits & "
" & name of logged on user as string & "
" & computer name as string & “.csv”}"
waithidden {pathname of system folder}\cmd.exe /C dir /s /b c:.mp3, c:.mp4, c:.avi, c:.wmv, c:.mpg, c:.mpeg, c:.rm, c:.flac, c:.3gp, c:.3gpp, c:.asf, c:.divx, c:*.qt | findstr /i /v “Roxio” | findstr /i /v “program” | findstr /i /v “windowsmediaplayer” | findstr /i /v “system32” | findstr /i /v “clock.avi”>"{parameter “outputfile1”}"
// go through the list in relevance to remove docs and settings and look up size/dates
appendfile {concatenation “%0d%0a” of (if (exists (file (it))) then (it & ", " & (((month of it as two digits & “/” & day_of_month of it as two digits & “/” & year of it as string) of date(local time zone) of it & " "& (two digit hour of it as string & “:” & two digit minute of it as string & “:” & two digit second of it as string) of time (local time zone) of it) of modification time of file(it)) as string & ", " & (size of file(it) as string) & ", " & (if (it contains “.”) then “.” & following text of last “.” of it else “n/a”)) else nothings) of lines whose (it as lowercase does not contain “documents and settings” AND it as lowercase does not contain “__besdata”) of file (parameter “outputfile1”)}
// replace the output file with the new file
delete “{parameter “outputfile1”}”
move __appendfile “{parameter “outputfile1”}”
// get the list of the files and their paths HIDDEN NOTE has same .csv name as outputfile 1
parameter “outputfile2” = "{pathname of parent folder of regapp “besclient.exe”}{“Media_” & current year as string & current month as two digits & current day_of_month as two digits & "
" & name of logged on user as string & "
" & computer name as string & “.csv”}"
waithidden {pathname of system folder}\cmd.exe /C dir /AH /s /b c:.mp3, c:.mp4, c:.avi, c:.wmv, c:.mpg, c:.mpeg, c:.rm, c:.flac, c:.3gp, c:.3gpp, c:.asf, c:.divx, c:*.qt | findstr /i /v “Roxio” | findstr /i /v “program” | findstr /i /v “windowsmediaplayer” | findstr /i /v “system32” | findstr /i /v “clock.avi”>"{parameter “outputfile2”}"
// go through the list in relevance to remove docs and settings and look up size/dates
appendfile {concatenation “%0d%0a” of (if (exists (file (it))) then (it & ", " & (((month of it as two digits & “/” & day_of_month of it as two digits & “/” & year of it as string) of date(local time zone) of it & " "& (two digit hour of it as string & “:” & two digit minute of it as string & “:” & two digit second of it as string) of time (local time zone) of it) of modification time of file(it)) as string & ", " & (size of file(it) as string) & ", " & (if (it contains “.”) then “.” & following text of last “.” of it else “n/a”)) else nothings) of lines whose (it as lowercase does not contain “documents and settings” AND it as lowercase does not contain “__besdata”) of file (parameter “outputfile2”)}
// replace the output file with the new file
delete “{parameter “outputfile2”}”
move __appendfile “{parameter “outputfile2”}”
##############################################
Here is my situation. I need to find all of the above file extension types that are hidden and not hidden and place them in a single .csv file that will be analyised by BF web reports.
Basically this…
Outputfile1 + Outputfile2 = Outputfile3 = {“Media_” & current year as string & current month as two digits & current day_of_month as two digits & "
" & name of logged on user as string & "
" & computer name as string & “.csv”}
Advice?