Search found 1165 matches
- 14 Feb 2015 16:17
- Forum: DOS Batch Forum
- Topic: mailsend script for FreeFileSync
- Replies: 72
- Views: 56079
Re: mailsend script for FreeFileSync
Ah, sorry... @echo off timeout /t 5 set subject=[Failed] The search terms were not found set /p first_line=<"C:\FFS\LastSyncs.log" echo %first_line%|findstr /i "successfully" >nul && set subject=[Success] Synchronization completed successfully echo %first_line%|findstr /i...
- 14 Feb 2015 13:28
- Forum: DOS Batch Forum
- Topic: mailsend script for FreeFileSync
- Replies: 72
- Views: 56079
Re: mailsend script for FreeFileSync
You can extract the first line of a file to a variable like this: set /p first_line=<"C:\FFS\LastSyncs.log" And from there, you can just search through that string. echo %first_line%|findstr /i "successfully" >nul && set subject=[Success] Synchronization completed success...
- 14 Feb 2015 02:25
- Forum: DOS Batch Forum
- Topic: mailsend script for FreeFileSync
- Replies: 72
- Views: 56079
Re: mailsend script for FreeFileSync
You generally get that error message when the file does not exist.
- 14 Feb 2015 01:32
- Forum: DOS Batch Forum
- Topic: mailsend script for FreeFileSync
- Replies: 72
- Views: 56079
Re: mailsend script for FreeFileSync
Delete the line
Change every instance of "C:\FFS\Logs\%recent%" to "C:\FFS\LastSync.log"
Code: Select all
for /f "delims=" %%x in ('dir "C:\FFS\Logs\" /od /b') do set recent=%%x
Change every instance of "C:\FFS\Logs\%recent%" to "C:\FFS\LastSync.log"
- 11 Feb 2015 23:27
- Forum: DOS Batch Forum
- Topic: How to rename a file with a date filename
- Replies: 6
- Views: 6442
Re: How to rename a file with a date filename
COPY "report.xlsx" "%SystemDrive%\docume~1\%UserName%\Desktop\currentDate.xlsx" COPY "report.xlsx" "%SystemDrive%\Users\%UserName%\Desktop\currentDate.xlsx" For XP and above, both can be shortened to simply %USERPROFILE%\Desktop\currentDate.xlsx The %date% va...
- 11 Feb 2015 21:49
- Forum: DOS Batch Forum
- Topic: how to calculate count of no.of pages in pdf file-batch file
- Replies: 38
- Views: 38751
Re: how to calculate count of no.of pages in pdf file-batch
Oh hey, I remember this topic. From five months ago.
- 09 Feb 2015 08:47
- Forum: DOS Batch Forum
- Topic: Help me in creating a batch
- Replies: 5
- Views: 4659
Re: Help me in creating a batch
You want an excel vba macro. Alternatively, if these are xlsx files and you have archival software (WinZip, WinRAR, 7-Zip, etc) installed, they're technically archive files with XML inside of folders. But you really, really, really don't want to create xlsx files that way. It's just a giant headache...
- 06 Feb 2015 09:55
- Forum: DOS Batch Forum
- Topic: Extreme programming - Coding binary through ECHO
- Replies: 13
- Views: 19095
Re: Extreme programming - Coding binary through ECHO
Hi I think you have forgotten to type these ALT numbers using the number pad. It won't work if you just type ALT and an asciicode. Do these steps! 1) Switch on Num Lock first 2) Hold Left ALT 3) Whilst holding Left Alt down type the Ascii code number on the KEYPAD e.g. 80 (P) 4) Let go of the Left ...
- 28 Jan 2015 15:19
- Forum: DOS Batch Forum
- Topic: Bat file shuts down to quickly without a pause
- Replies: 9
- Views: 7978
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 08:55
- Forum: DOS Batch Forum
- Topic: How to best delete directories
- Replies: 6
- Views: 6602
Re: How to best delete directories
rd by itself just removes directories the /s flag deletes all files and subfolders as well From rd /? RMDIR [/S] [/Q] [drive:]path RD [/S] [/Q] [drive:]path /S Removes all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree. /Q Quiet ...
- 26 Jan 2015 08:01
- Forum: DOS Batch Forum
- Topic: How to best delete directories
- Replies: 6
- Views: 6602
Re: How to best delete directories
del can't delete folders
Try using rd /s @path instead.
Try using rd /s @path instead.
- 23 Jan 2015 09:00
- Forum: DOS Batch Forum
- Topic: Call .bat from another machine
- Replies: 8
- Views: 5344
Re: Call .bat from another machine
Is P: a mapped network drive? I seem to recall something about needing to re-map the drive at the start of the script.
- 23 Jan 2015 07:42
- Forum: DOS Batch Forum
- Topic: Rename xml file based on the content inside using window bat
- Replies: 5
- Views: 6210
Re: Rename xml file based on the content inside using window
CSV.bat will surely help with this.
- 22 Jan 2015 19:51
- Forum: DOS Batch Forum
- Topic: DOS equivalent of linux command pass
- Replies: 9
- Views: 6577
Re: DOS equivalent of linux command pass
I left out the "delims=" because they wanted a space-delimited string, but yeah, good call on the /a:-d
- 22 Jan 2015 18:14
- Forum: DOS Batch Forum
- Topic: Problems printing with DOS program using "net use lpt1"
- Replies: 8
- Views: 8765
Re: Problems printing with DOS program using "net use lpt1"
Well, first I would try out the command to see if it even works. Just put the code in a command prompt. And then if it does fix the problem, I would reboot and see if the problem comes back. ⋅ If the problem is initially fixed but comes back after the reboot, you need to add the line to th...