Search found 15 matches
- 24 Dec 2015 14:51
- Forum: DOS Batch Forum
- Topic: Folder Size Return 0
- Replies: 19
- Views: 13965
Re: Folder Size Return 0
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.
- 24 Dec 2015 11:41
- Forum: DOS Batch Forum
- Topic: Folder Size Return 0
- Replies: 19
- Views: 13965
Re: Folder Size Return 0
There will be approx 10 files in sub2.
- 24 Dec 2015 06:34
- Forum: DOS Batch Forum
- Topic: Folder Size Return 0
- Replies: 19
- Views: 13965
Re: Folder Size Return 0
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 ...
- 23 Dec 2015 22:24
- Forum: DOS Batch Forum
- Topic: Folder Size Return 0
- Replies: 19
- Views: 13965
Re: Folder Size Return 0
Once again thanks for your help but I have run into a situation. The script you provided works great for what I was trying to accomplish but something has changed. The folder structure has been changed on me. Original structure: C:\main\sub1 New structure: C:\main\sub1\sub2 Yes, your script does wha...
- 17 Dec 2015 15:31
- Forum: DOS Batch Forum
- Topic: Folder Size Return 0
- Replies: 19
- Views: 13965
Re: Folder Size Return 0
Yes, I did noticed the . in the log file. I don't have to have dead accuracy. 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. As long as the current log file content is less than the fut...
- 17 Dec 2015 09:08
- Forum: DOS Batch Forum
- Topic: Folder Size Return 0
- Replies: 19
- Views: 13965
Re: Folder Size Return 0
This came out of generalizing your original framework and incorporating previous suggestions: FolderSize.bat @Echo Off :FolderSize [folder] setLocal EnableDelayedExpansion set "log=log.txt" set "target=c:\main" If .%~1 NEQ . Set "target=%~1" set "dirsize=0" s...
- 15 Dec 2015 18:55
- Forum: DOS Batch Forum
- Topic: Folder Size Return 0
- Replies: 19
- Views: 13965
Re: Folder Size Return 0
Thank you both for valuable information.
- 15 Dec 2015 10:02
- Forum: DOS Batch Forum
- Topic: Folder Size Return 0
- Replies: 19
- Views: 13965
Re: Folder Size Return 0
Ah, thank you for pointing that out. Didn't see it. So, windows has no command to use in batch file to get directory size?
Thanks again
Thanks again
- 15 Dec 2015 09:23
- Forum: DOS Batch Forum
- Topic: Folder Size Return 0
- Replies: 19
- Views: 13965
Folder Size Return 0
Hello all I am attempting to loop thru a main directory check the the subfolders for a file called log.txt. The log file contains the folder size. If the log file does not exist I want to write the directory's side to the log file and save it. The sub directories being checked are fairly small to st...
- 17 Sep 2015 10:16
- Forum: DOS Batch Forum
- Topic: Help with reading file
- Replies: 3
- Views: 3110
Re: Help with reading file
Thanks Squashman. I was using cut because I ran across it a while back and didn't know any better, but I see from your example an easy way of doing it.
Thanks again
Thanks again
- 17 Sep 2015 09:36
- Forum: DOS Batch Forum
- Topic: Help with reading file
- Replies: 3
- Views: 3110
Help with reading file
I have simple text file with information like the following: Jim:1 Tom:2 Sam:3 I have a script that will read each line a cut the string at the : storing each part in a variable with the following: for /f "tokens=1,2 delims=:" %%a in (sample.txt) DO ( findstr ":" sample.txt |cut ...
- 07 Sep 2015 06:50
- Forum: DOS Batch Forum
- Topic: Loop Thru File Use Line Value in Operation
- Replies: 3
- Views: 2833
Re: Loop Thru File Use Line Value in Operation
Many thanks, after the do statement, is it possible to multiple commands on the same line, or do you have to use ( )?
- 06 Sep 2015 19:09
- Forum: DOS Batch Forum
- Topic: Loop Thru File Use Line Value in Operation
- Replies: 3
- Views: 2833
Loop Thru File Use Line Value in Operation
I am trying to open a text file, read it line by line, use each line in script commands. I am having trouble getting it to work. The text file being opened and read looks as follows: abc:123-def ghi:456-jkl mno:789-pqr I am opening the file and looping thru with the following code: set "spath=C...
- 06 Sep 2015 09:23
- Forum: DOS Batch Forum
- Topic: Cut Command Not Working
- Replies: 2
- Views: 2606
Re: Cut Command Not Working
Thank you greatly, had to modify the path so with your suggestions.
- 04 Sep 2015 06:30
- Forum: DOS Batch Forum
- Topic: Cut Command Not Working
- Replies: 2
- Views: 2606
Cut Command Not Working
I have a fairly simple script that sets a base path, opens a txt file, reads the line, cuts the file into parts based on characters. The same script had been working fine a year ago but for some reason it will not execute now. When I run the following, the command window flashes up and closes. I can...