How to get size of zip files in a folder and save the name of file and size of zip file in excel -


i want create batch file gets size of zip files available in folder , save folder name appropriate file size in .csv file. used below command got 1 output because when loop ends last result fetched in .csv file

for %%i in (*.txt) @echo %%~ni,%%i >c:\users\anoopn\desktop\out.csv 

i want result in format size in cell , whole path in different cell

hope answer soon

(for %%i in (*.zip) echo(%%~ni,%%~zi)>c:\users\anoopn\desktop\out.csv 

to folder's name calculated size of zip files use this:

@echo off &setlocal /f "tokens=3" %%a in ('dir *.zip') (     call set "size=%%free%%"     set "free=%%a" ) (echo(%cd%,%size%)>c:\users\anoopn\desktop\out.csv 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -