Search found 9 matches
- 16 May 2017 14:26
- Forum: DOS Batch Forum
- Topic: Win 8.1 messing up dates!
- Replies: 10
- Views: 7031
Re: Win 8.1 messing up dates!
I don't get this result on newly created directories. But (odd enough) i get this result if i overwrite an existing backup directory - by executing the script twice within the same minute (my "test.bat"): ...The timestamp in my tests is that of "%BackupSource2%". In this case yo...
- 15 May 2017 17:32
- Forum: DOS Batch Forum
- Topic: Close DOS window
- Replies: 5
- Views: 6158
Re: Close DOS window
Because you didn't use the START command Excel was run synchronoulsy. That should have been the reason why the batch window didn't close. Thus, I don't think you would even need EXIT /B. However you still need to run Excel asynchronously using START. start "" "excel.exe" "d...
- 15 May 2017 16:02
- Forum: DOS Batch Forum
- Topic: Close DOS window
- Replies: 5
- Views: 6158
Re: Close DOS window
Sure, just add && exit /b to the line where you call the Excel file. For instance, @echo off pause start "" excel.exe && exit /b Thanks Shadow. I just tried out your code and am not getting the results I hoped for. This is my line to open the file (before adding your code)...
- 15 May 2017 15:44
- Forum: DOS Batch Forum
- Topic: Win 8.1 messing up dates!
- Replies: 10
- Views: 7031
Re: Win 8.1 messing up dates!
Without seeing the source code it is hard to tell, if your batch file is causing such symptoms, but i doubt that. If you are are accessing a network drive, then maybe the date of that pc is wrong, else you should create a minimized (and anonymized) script where this happens, so we could check if th...
- 14 May 2017 15:44
- Forum: DOS Batch Forum
- Topic: Close DOS window
- Replies: 5
- Views: 6158
Close DOS window
I have some DOS commands that run (backup files) and then the last command is to open an Excel file. What happens is the DOS window stays open (in the background) and when the Excel file is closed the DOS window finally closes on its own. Is it possible to have the DOS window close automatically, ri...
- 14 May 2017 15:18
- Forum: DOS Batch Forum
- Topic: Win 8.1 messing up dates!
- Replies: 10
- Views: 7031
Re: Win 8.1 messing up dates!
Thanks guys! Something a little strange is happening now with the .bat file. The folder name created is fine: 2017-05-14 17-09 but the date of this folder shown to the right of the folder name is: 04/30/2017 19:14 and this date is persistent! So if I run the batch file a few time, new folders are cr...
- 13 May 2017 13:53
- Forum: DOS Batch Forum
- Topic: Win 8.1 messing up dates!
- Replies: 10
- Views: 7031
Re: Win 8.1 messing up dates!
As long as you're not using a Home Edition of XP, you should have full support of the WMI Command line, (WMIC.exe). You could then replace the top half of your script with this: Rem 2. Create new backup set For /F "EOL=L" %%A In ('WMIC OS GET LocalDateTime') Do For %%B In (%%~nA ) Do Set ...
- 13 May 2017 13:08
- Forum: DOS Batch Forum
- Topic: Win 8.1 messing up dates!
- Replies: 10
- Views: 7031
Re: Win 8.1 messing up dates!
Please post the output of the following batch file ("test.bat"): @echo off echo "%date%" echo "%time%" pause penpen Thanks for helping! WinXP: "Sat 05/13/2017" "14:59:47.06" ------------------ Win 8.1: "05/13/17" "15:03:52.76"
- 12 May 2017 20:07
- Forum: DOS Batch Forum
- Topic: Win 8.1 messing up dates!
- Replies: 10
- Views: 7031
Win 8.1 messing up dates!
The following is a main part of my .bat file: :: 2. Create new backup set set bkuphour=%time:~0,2% if "%bkuphour:~0,1%"==" " set bkuphour=0%time:~1,1% set bkupfldr=%date:~10,4%-%date:~4,2%-%date:~7,2% %bkuphour%-%time:~3,2% echo+ echo CREATING FOLDER %BackupTarget2%%bkupfldr%\ if...