Search found 81 matches
- 29 Jan 2015 02:08
- Forum: DOS Batch Forum
- Topic: Validate Whole Number or Zero with Function
- Replies: 8
- Views: 7429
Re: Validate Whole Number or Zero with Function
I did this, and I got FALSE as the variable: I switched your goto:eof and your exit /b around. I added the pause so you could see the result. @Echo Off setlocal enabledelayedexpansion Set variable=12b Call:checkNumber %variable% isNumb Echo %variable% -- is it zero or a whole number? !isNumb! pause ...
- 27 Jan 2015 23:31
- Forum: DOS Batch Forum
- Topic: Bat file shuts down to quickly without a pause
- Replies: 9
- Views: 6097
Re: Bat file shuts down to quickly without a pause
You're completely right @squashman I should've known better than to ask a question without including code. In the future I will refrain from doing so as they do invite sarcastic responses. And honestly I really appreciate this forum and I don't like seeing snarky comments as they are not helpful to ...
- 27 Jan 2015 22:18
- Forum: DOS Batch Forum
- Topic: Bat file shuts down to quickly without a pause
- Replies: 9
- Views: 6097
Re: Bat file shuts down to quickly without a pause
I understand the snarkiness squashman, and would write the same thing as you did. However, in this instance, I was just asking generally has anyone ever seen this? I googled it and couldn't find any evidence, but I know you all do a lot of bat script writing, and have seen mentioned on the forum a f...
- 27 Jan 2015 21:54
- Forum: DOS Batch Forum
- Topic: Bat file shuts down to quickly without a pause
- Replies: 9
- Views: 6097
Bat file shuts down to quickly without a pause
Has anyone ever created a batch script that will error out unless they put a pause in, or the old fashioned ping -n 20 127.0.0.1 1>nul ? Cause that is what I'm experiencing. It is blowing my mind. Without the ping it closes. Is it possible my computer is too fast for the batch file? i7 win 64 bit 8 ...
- 30 May 2014 02:47
- Forum: DOS Batch Forum
- Topic: WinSCP vs FTP.exe vs NETUSE w/Robocopy [WinSCP is Winner!]
- Replies: 4
- Views: 6527
WinSCP vs FTP.exe vs NETUSE w/Robocopy [WinSCP is Winner!]
WinSCP is the winner based on the criteria in the first post with the addition that I forgot about, that sometimes there are subfolders in the video folder with files in them. However, this is just based on the scripts that I was able to come up with. Any other ideas are very welcome. The only way t...
- 29 May 2014 12:53
- Forum: DOS Batch Forum
- Topic: WinSCP vs FTP.exe vs NETUSE w/Robocopy [WinSCP is Winner!]
- Replies: 4
- Views: 6527
WinSCP vs FTP.exe vs NETUSE w/Robocopy [WinSCP is Winner!]
Hi guys, so I'm almost ready to start my speed differential tests between windows cmd ftp / winscp ftp / and net use w/robocopy. I've come across this issue though I need some help with concerning the windows ftp, and after much googling can't find anything, which baffles my mind. I've got scripts r...
- 26 May 2014 03:43
- Forum: DOS Batch Forum
- Topic: File Comparison by Date Time
- Replies: 20
- Views: 15101
Re: File Comparison by Date Time
julesverne wrote:I missed some data you stated in your original post so I edited my first reply above. Make that change and try it again.
Whoops... edited again, because my edit needs to be reversed. "%%A.gz" EQU "%%B"
- 26 May 2014 03:33
- Forum: DOS Batch Forum
- Topic: File Comparison by Date Time
- Replies: 20
- Views: 15101
Re: File Comparison by Date Time
I missed some data you stated in your original post so I edited my first reply above. Make that change and try it again. Hmm i have tried it out. However i am now getting the last file in both for loops and not all files The output is now only file e:\Pandoraflyff\Resclient\Word\WdVolcaneYellow\Pand...
- 26 May 2014 03:20
- Forum: DOS Batch Forum
- Topic: File Comparison by Date Time
- Replies: 20
- Views: 15101
Re: File Comparison by Date Time
Nice. I was looking at dostips somewhere and noticed the xcopy method, very interesting. Doesn't Robocopy have a way to do that too? Where it won't copy it'll just give you a list and you can set your switches to include certain file attributes that you can in this case compare the two files against...
- 26 May 2014 02:44
- Forum: DOS Batch Forum
- Topic: function call inside function is not working
- Replies: 6
- Views: 5516
Re: function call inside function is not working
I wonder two things for you to test. the escape character ^ before the colon : I can't remember if it's needed or not. FOR /f "tokens=* delims=" %%I in ('wmic process get ProcessId^,CommandLine /format^:csv ^|findstr java^|findstr "domain.home"^|findstr /V /I /C:"findstr&quo...
- 26 May 2014 02:25
- Forum: DOS Batch Forum
- Topic: File Comparison by Date Time
- Replies: 20
- Views: 15101
Re: File Comparison by Date Time
Taking some time looking at your code you will never compare two files. The reason is because you need to embed the 2nd loop into the 1st loop, so that file %a matches a filename in the 2nd loop. and then it can perform the date comparison. The output you're seeing is the last file each of your for ...
- 26 May 2014 02:04
- Forum: DOS Batch Forum
- Topic: File Comparison by Date Time
- Replies: 20
- Views: 15101
Re: File Comparison by Date Time
dostips has this as one of their tricks, that may be useful to you. Meanwhile I'll keep checking to see if I can figure out what the issue is.
http://www.dostips.com/DtTipsDateTime.php#Function.CmpFTime
http://www.dostips.com/DtTipsDateTime.php#Function.CmpFTime
- 24 May 2014 12:03
- Forum: DOS Batch Forum
- Topic: Dir Listing based on filetype and filename iteration
- Replies: 6
- Views: 6605
Re: Dir Listing based on filetype and filename iteration
This is Endoro's code - I just added the first bit to create the files and made it process the current folder: It works here - run it in an empty folder. @echo off for %%a in ( Recording55555_0.mov Recording24562_3.mov Recording24562_4.mov Recording24562_12.mov Recording24562_3.flv Recording24562_4...
- 23 May 2014 20:34
- Forum: DOS Batch Forum
- Topic: Dir Listing based on filetype and filename iteration
- Replies: 6
- Views: 6605
Re: Dir Listing based on filetype and filename iteration
So... I figured out how to get it to do everything I needed it to albeit it is still longer code than I'd like. Endoro's slim code looks a lot more inviting although I can't get a real grasp on how to fix it or if I'm running it incorrectly. If anyone can make this code more efficient, and/or perhap...
- 23 May 2014 19:53
- Forum: DOS Batch Forum
- Topic: Dir Listing based on filetype and filename iteration
- Replies: 6
- Views: 6605
Re: Dir Listing based on filetype and filename iteration
@Endoro I tried it out and got a message I've never seen before in CMD. Environment variable mov. not defined Here's the output with @echo on >FOR %a IN (test/Recording*_*.mov) DO (FOR /F "delims=_" %b IN ("%~a") DO SET /a mov.%~b+=1 ) >FOR /F "tokens=1*delims==" %a IN ...