Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

@Files, @FileSize returning nothing...

May
855
0
As is usual for me, right off of the screen:

[C:\]Echo %@Comma[%@Files[/s /H *]] Files %@Comma[%@FileSize[/S *,b] Bytes %@Comma[%@FileSize[/A *,b,a]] Bytes Allocated
[C:\]

As you can presumably see, nothing is displayed. What is going on here?
 
Your command gives an error here.
Code:
v:\> Echo %@Comma[%@Files[/s /H *]] Files %@Comma[%@FileSize[/S *,b] Bytes %@Comma[%@FileSize[/A *,b,a]] Bytes Allocated
TCC: Syntax error "@FileSize[/S *,b"
After adding a closing ']' to the second @COMMA, and changing '/A' to '/S' in the third @FILESIZE (which I suppose you meant), I get reasonable output.
Code:
v:\> Echo %@Comma[%@Files[/s /H *]] Files %@Comma[%@FileSize[/S *,b]] Bytes %@Comma[%@FileSize[/s *,b,a]] Bytes Allocated
2,151 Files 202,299,475 Bytes 207,249,408 Bytes Allocated
v:\>
 
And you can avoid two of the @COMMAs by adding 'c' to the scale parameter.
Code:
v:\> Echo %@Comma[%@Files[/s /H *]] Files %@FileSize[/S *,bc] Bytes %@FileSize[/s *,bc,a] Bytes Allocated
2,151 Files 202,299,475 Bytes 207,249,408 Bytes Allocated
 
Vince you are correct, there were syntax errors. But even after I fixed them (I found them myself) I still got the same thing: absolutely nothing; no error message(s). In fact, I got absolutely nothing when I echoed just %@Files[/S /H *].
 
It's hard to believe that doesn't work. Do you have a user-defined @FILES function?
 
No Vince, it's not a function. Below is the complete list of my functions so you can see it's not there.
Code:
DC:=C:\D\Documents
DO:=C:\D\DOS
FI:=C:\D\Documents\Financial
JP:="C:\Program Files (x86)\JPSoft\TCMD15"
MS:="Z:\Money Spreadsheets"
PF:=C:\D\Program Files
Ac*tualFiles=C:\D\DOS\Startx ActualFiles
Ad*dTrailingQuotes=C:\D\DOS\AddTrailingQuotes.btm
BD*TTMDir=(PDir %$ /A-D /S /(dy/m/d th:m:s zc fpn) | Find /V "\$VAULT\" | Find /V "BuildLog.htm" | Find /V ".dep" | Find /V ".idb" | Find /V ".ilk" | Find /V ".manifest" | Find /V ".ncb" | Find /V ".obj" | Find /V ".pdb" | Find /V ".suo" | Find /V ".vcproj" | Find /V /I "zz." | Find /V "\Temp\" | Find /V /I ".7z" | Find /V /I ".zip" | Find /V /I "crap" | Find /V /I "Junk" | Find /V /I "Junq" | Find /V /I "Fuck" | Sort /R)
Bu*ildPath=C:\D\DOS\Startx BuildPath
Cla*ssifyDirectories=C:\D\DOS\ClassifyDirectories.btm
Cle*anZ-DriveC++Directories=PushD "Z:\Development\C, C++" & For /D D1 in (*) Do (For /D D2 in ("%D1\*") Do (PushD "%D2" &  "D:\DOS\CleanC++Directory.btm" "%@Full[%D2]" & PopD)) & PopD
Co*lumnNumbers=*Start /PGM Notepad C:\D\DOS\ColumnNumbers.txt
CR*atio=Echo %@Eval[100-(100*%@FileSize[*.7z,b,a]/(%@FileSize[/S *,b,a]-%@FileSize[*.7z,b,a]))]
DD*PYA=C:\D\DOS\DelDups32.exe /P /Y /A
DDi*r=*Dir /K /M /AD /H
Dir=*Dir /H
Doc*Reboot=C:\D\DOS\DocReboot.btm
DoM*agnify=NirCmd Elevate C:\windows\System32\Magnify.exe & NirCmd SetProcessPriority Magnify.exe AboveNormal
Dr*iveType=C:\D\DOS\DriveType.btm
DT*TM=@Echo %_DOWF, %_MonthF %_Day, %_Year (%_Date) %_Time
DU*CVF=C:\D\DOS\Startx DUCVF
EchoA*rgs=C:\D\DOS\EchoArgs.btm
Ela*psedTime=*Echo %TE51413
EP=For /L %N in (0,1,%@Dec[%@Words[";",%Path]]) Echo %@LFN[%@Word[";",%N,%Path]]
EPR=For /L %N in (0,1,%@Dec[%@Words[";",%Path]]) Echo %@Word[";",%N,%Path]
Ex*cel=*Start /PGM "C:\Program Files (x86)\Microsoft Office\OFFICE11\EXCEL.EXE" %$
Exp*ortClear=Attrib -R C:\D\Temp\Export*.csv & Del C:\D\Temp\Export*.csv
FCB=C:\Windows\System32\FC.exe /B %$
FD*ir=*Dir /A-D /H /K /M
Files*SortedByExtension=C:\D\DOS\FilesSortedByExtension.btm
FileT*ype=C:\D\DOS\Startx FileType
Filt*erRawMusicList=C:\D\DOS\Startx FilterRawMusicList
FixDi*r=C:\D\DOS\FixDir.btm
FixS*ongNames=C:\D\DOS\FixSongNames.btm
Fl*ush=Start /B /C /Elevated /L /PGM "C:\D\SysInternals\PSSync.exe" Z: E: D: C:
FormatZ*NTFS=C:\D\DOS\FormatZNTFS.btm
GetC*lusterSize=C:\D\DOS\GetClusterSize.btm
GetL*ongPathDirectoryNames=C:\D\DOS\Startx GetLongPathDirectoryNames
GetM*axLineLength=C:\D\DOS\GetMaxLineLength.exe
GetPas*words=CD Z:\ & If Not Exist %@If["%1" == "",Z:\Info,%1] MD %@If["%1" == "",Z:\Info,%1] /D & C:\D\DOS\UnZip.exe "%@ExecStr[*PDir /(fpn) /O-D /A-D "C:\D\DOCUME~1\FINANC~1\LOGONA~1\Account Information.V20*.zip"]" & *Start .
GetPat*hDirectoryNames=C:\D\DOS\Startx GetPathDirectoryNames
GetRawM*usicList=C:\D\DOS\Startx GetRawMusicList
GetRawP*athDirectoryNames=C:\D\DOS\StartX GetRawPathDirectoryNames
GetSh*ortPathDirectoryNames=C:\D\DOS\Startx GetShortPathDirectoryNames
GetSu*bstdDriveTarget=C:\D\DOS\GetSubstdDriveTarget.btm
Han*dle=C:\D\SysInternals\Handle %@Full[%1]
HelpS*afeChars=*Start /PGM "C:\Program Files\JPSoft\Plugins\SafeChars.chm"
HelpT*CC=*Start /PGM "C:\Program Files\JPSoft\TCMD15x64\tcmd.chm"
Hi*story=*History | List
HX*D=C:\D\DOS\HXD.btm
ID*DPYA=C:\D\DOS\DelDups32.exe /P /I /Y /A
IIM*akeAlbumList=C:\D\DOS\Startx MakeAlbumListII
IIR*emoveEmptyDirectories=C:\D\DOS\Startx IIRemoveEmptyDirectories
KeepA*live=C:\D\DOS\KeepAlive.btm
KeepL*ines=C:\D\DOS\Startx KeepLines
Le*adPath=C:\D\DOS\Startx LeadPath
LF*unction=Function %$ | List
List7*zFileContents=For %F in ("%1") Do (Echo ********** %F ********** & 7z L "%F")
ListD*rives=C:\D\DOS\ListDrives.btm
Lo*ckHunter="C:\Program Files\LockHunter\LockHunter.exe"
ND*ir=*Dir /H
NP=*Start /PGM C:\Windows\System32\Notepad.exe %$
NPRO=SetLocal & Set File="%@UnQuoteS[%1]" & Set Attrib=+%@Replace[C,,%@Replace[_,,%@Attrib[%File]]] & Attrib -RHS %File & *Start /Wait Notepad %File & Attrib %Attrib %File & EndLocal
OOAc*cess*Start=/PGM "C:\Program Files (x86)\OpenOffice.org 3\program\sbase.exe"
OODr*aw=*Start /PGM "C:\Program Files (x86)\OpenOffice.org 3\program\sdraw.exe"
OOEx*cel=*Start /PGM "C:\Program Files (x86)\OpenOffice.org 3\program\scalc.exe"
OOIm*press=*Sta   rt /PGM "C:\Program Files (x86)\OpenOffice.org 3\program\simpress.exe"
OOMa*th=*Start /PGM "C:\Program Files (x86)\OpenOffice.org 3\program\smath.exe"
OOOf*ice=*Start /PGM "C:\Program Files (x86)\OpenOffice.org 3\program\soffice.exe"
OOWe*b=*Start /PGM "C:\Program Files (x86)\OpenOffice.org 3\program\sweb.exe"
OOWo*rd=*Start /PGM "c:\Program Files (x86)\OpenOffice.org 3\program\swriter.exe"
Op*era=*Start /PGM C:\PROGRA~2\Opera\Opera.exe
Or*iginalDirectory=CDD %BeforeDecryptDirectory
PF*ind=For /T";" %P in (%Path) If IsFile "%P"\*%@Name[%1]*.*%@Ext[%1]* PDir /P /A-D %P\*%@Name[%1]*.*%@Ext[%1]* /(dy-m-d th:m:s zc fpn) | Sort | C:\D\dos\DuplicateRemover.Release.exe | C:\Windows\System32\Find.exe /V "Discarding duplicate"
PRE_INPUT=C:\D\DOS\SaveHistory
Prog*ram=Echo %@FType[%@Assoc[%1]]
Proj*ectCleanUp=C:\D\DOS\ProjectCleanup.btm
QS*tart=*Start /PGM
Sa*veDirectory=Set BeforeDecryptDirectory=%_CWD
Show7*zCompressionStatistics=C:\D\DOS\Show7zCompressionStatistics.btm %$ |& List
ShowC*PPProgramHistory=C:\D\DOS\ShowCppProgramHistory.btm
So*litaire=*Start /PGM C:\Users\ALLUSE~1\MICROS~1\Windows\STARTM~1\Programs\Startup\SOLITA~1.LNK
SPF*Lite=*Start /PGM "C:\Program Files (x86)\SPFLite\SPFLite.exe"
TCC=*Start /PGM "C:\Program Files\JPSoft\TCMD15x64\tcc.exe"
TCC32=*Start /PGM "C:\Program Files (x86)\JPSoft\TCMD15\tcc.exe"
TCMD=*Start /PGM "C:\Program Files\JPSoft\TCMD15x64\tcmd.exe"
TCMD32=*Start /PGM "C:\Program Files (x86)\JPSoft\TCMD15\tcmd.exe"
TCMDE*levated=*Start /Elevated /PGM "C:\Program Files\JPSoft\TCMD15x64\tcmd.exe"
UpM*agnify=NirCmd Elevate C:\windows\System32\Magnify.exe & NirCmd SetProcessPriority Magnify.exe AboveNormal
VC08="C:\D\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VCExpress.exe"
Vi*ewPDF="C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" %@SFN[%@Unquote[%1]]
Wi*namp=*Start /PGM C:\D\PROGRA~1\WinAmp\winamp.exe
WMP*Layer=*Start /PGM C:\PROGRA~2\WI54FB~1\wmplayer.exe
Wo*rd=*Start /PGM "C:\Program Files (x86)\Microsoft Office\OFFICE11\WINWORD.EXE" %$
XXXXDir=C:\D\DOS\DirPlus %$
 
No Vince, it's not a function. Below is the complete list of my functions so you can see it's not there.
Code:
DC:=C:\D\Documents
DO:=C:\D\DOS
FI:=C:\D\Documents\Financial

Those look like aliases to me.... What does FUNCTION FILES report?
 
Sorry Charles, you are correct, those were aliases. Here's the list of functions:
Code:
AppName=%@If[%@Index[%@RawAppName[%1],/] == -1,%@RawAppName[%1],%@Trim[%@Left[%@Index[%@RawAppName[%1],/],%@RawAppName[%1]]]]
BaseFileName=%@FileName[%@Left[-%@Inc[%@Len[%@Ext[%@If["%@UnQuoteS[%1]" == "",%_BatchName,%@UnQuoteS[%1]]]]],%@If["%@UnQuoteS[%1]" == "",%_BatchName,%@UnQuoteS[%1] ]]]
BatchFileName="%@Left[%@Index[%@UnQuoteS[%@FileName[%1]],.,-1],%@UnQuoteS[%@FileName[%1]]]"
Executable=%@If['%@Trim[%@FType[%@Assoc[.%@Ext[%1]]]]' == '""',%1,%@If["%@Assoc[.%@Ext[%1]]" != "",%@Field[" ",0,%@FType[%@Assoc[.%@Ext[%1]]]],%COMSPEC]]
PctTotal=%@Format[4.4,%@Eval[100*%@FileSize[%2,b,a]/%@DiskTotal[%1]=1.1]]%%
Link=%@If["%@SymLink[%1]"=="",%@If["%@Junction[%1]"=="",^<Not A Junction Or Symbolic Link^>,%@QuoteS[%@Junction[%1]]],%@QuoteS[%@SymLink[%1]]]
RawAppName=%@FType[%@Assoc[.%@Ext[%@UnQuoteS[%1]]]]
RemoveParameter=%@ExecStr[E:\DOS\RemoveParameter %1 %2]
SubDirs=%@ExecStr[E:\DOS\SubDirs.btm %$]
TrueFileSize=%@Trim[%@Replace[,,,%@ExecStr[PDir %1 /(ZCA)]]]
UnOuterQuotes=%@If['%@Left[1,%1]' == '"' .AND. '%@Right[1,%1]' == '"',%@Left[-1,%@Right[-1,%1]],%1]
VerifyFileNameAndPath=%@ExecStr[E:\DOS\VerifyFileNameAndPath %1]
 
Back
Top
[FOX] Ultimate Translator
Translate