Folder Size Return 0

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
btpoole
Posts: 15
Joined: 04 Sep 2015 06:28

Re: Folder Size Return 0

#16 Post by btpoole » 24 Dec 2015 06:34

i beleive I wrongly stated something. I want the log.txt to only be present in sub2 for the size ofsub2 and no other. The sub2 will be the directory which grows in size and will be the location of the php script that will be executed. I know the log is currently create for main, sub1 and sub2. When the script loops it wants to add up main, sub1 and sub2, but with new structure I am only interested in sub2. Once again I am sorry for the confusion.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Folder Size Return 0

#17 Post by foxidrive » 24 Dec 2015 10:19

btpoole wrote:The real purpose of the log file checking the folder size is to compare it to a future run of the file to see if a process is still running and creating content.

I will have multiple instances of the same process running creating content in individual folders. If one of the instances stops, I hope the script checking the folder sizes initiates another script that produces a warning window, or something of the like.


Does the process create lots of files or just one? <--- I forgot to type that blue word earlier

If it's just one then steps need to be taken to find out if the file is still growing - as Windows doesn't always show the file growing continually.

btpoole
Posts: 15
Joined: 04 Sep 2015 06:28

Re: Folder Size Return 0

#18 Post by btpoole » 24 Dec 2015 11:41

There will be approx 10 files in sub2.

thefeduke
Posts: 211
Joined: 05 Apr 2015 13:06
Location: MA South Shore, USA

Re: Folder Size Return 0

#19 Post by thefeduke » 24 Dec 2015 12:56

btpoole wrote:i beleive I wrongly stated something. I want the log.txt to only be present in sub2 for the size ofsub2 and no other. The sub2 will be the directory which grows in size and will be the location of the php script that will be executed. I know the log is currently create for main, sub1 and sub2. When the script loops it wants to add up main, sub1 and sub2, but with new structure I am only interested in sub2. Once again I am sorry for the confusion.
This was treated as a generalized solution, but if it is that specific, why no just apply it as-is, and pass to it a target argument of 'C:\main\sub1\sub2'? The main and sub1 directories do not come into play at all. One OOPS is if sub2 also has sub-directories.
John A.

btpoole
Posts: 15
Joined: 04 Sep 2015 06:28

Re: Folder Size Return 0

#20 Post by btpoole » 24 Dec 2015 14:51

Yes, that was my thought to only evaluate sub2 but was not sure how to get to only sub2 directory without have the script evaluating main and sub1.

Post Reply