1.

Solve : getting file size with space in folder...?

Answer»

I'm trying to get the FILE size of a file using the following code;

Code: [Select]for/F %%i IN ("\\SERVER\snp_other_rsync\new folder\test.txt") DO echo %%~zi
But %%~zI equals Nul.

Is it not possible to check file size where there is a space in the path?Quote

Is it not possible to check file size where there is a space in the path?

Yes it is. You have to STUFF the entire file name into a single variable either by ELIMINATING the space as the default delimiter or DECLARING a single variable with the spaces included:

I chose the later:

Code: [Select]@echo off
for /f "TOKENS=*" %%i in ("\\server\snp_other_rsync\new folder\test.txt") do echo %%~zi

Good luck.


Discussion

No Comment Found