Hello all,
Could someone please give me a guidance of how to write a batch file that would read an xml file, and then copy the text that in bewtween <label>...........</lablel>, and then write it to a new file? Thank you so much for your help.
Search found 23 matches
- 14 Nov 2014 08:54
- Forum: DOS Batch Forum
- Topic: Read a xml file and copy a perticular text to a new file
- Replies: 3
- Views: 4036
- 07 Nov 2014 13:05
- Forum: DOS Batch Forum
- Topic: copy files to a different folder by date stamp
- Replies: 15
- Views: 12671
Re: copy files to a different folder by date stamp
Got it to work. Thanks for your help.
- 07 Nov 2014 08:47
- Forum: DOS Batch Forum
- Topic: copy files to a different folder by date stamp
- Replies: 15
- Views: 12671
Re: copy files to a different folder by date stamp
This is what I have, but it still does not work. Thanks. @echo off if "%~1"=="" ( FORFILES /p f:\logs /M *.lg* /d -1 /c "cmd /c call 0x22%~f00x22 @fdate @file" 2>nul goto :EOF ) :: this processes each file older than 1 day with the date and filename info, from the forfi...
- 07 Nov 2014 08:15
- Forum: DOS Batch Forum
- Topic: copy files to a different folder by date stamp
- Replies: 15
- Views: 12671
Re: copy files to a different folder by date stamp
Hello all, I got the above script to run. However, I never delete the folder, therefore, it filled up my hard drive quick. I would like to use the same script above, but delete the folder that older than 30 days. Therefore, everytime the script runs, it will create a new folder and delete the folder...
- 20 Oct 2014 07:21
- Forum: DOS Batch Forum
- Topic: Batch file to check a process that running on other PC
- Replies: 12
- Views: 9946
Re: Batch file to check a process that running on other PC
Thank you so much everyone. Learned something new again. Have a good day.
- 17 Oct 2014 09:06
- Forum: DOS Batch Forum
- Topic: Batch file to check a process that running on other PC
- Replies: 12
- Views: 9946
Re: Batch file to check a process that running on other PC
I thought Setlocal EnableDelayedExpansion, to enable the function and it allows you pass the information to it. I am still learning the Batch file. Thanks for your help.
- 17 Oct 2014 08:17
- Forum: DOS Batch Forum
- Topic: Batch file to check a process that running on other PC
- Replies: 12
- Views: 9946
Re: Batch file to check a process that running on other PC
@echo off Setlocal EnableDelayedExpansion Set _password="P$5$C$!3" tasklist /S dom-dnfconfig /U dom-dnfconfig\nagiosadm /P %_password% /fi "IMAGENAME eq notepad.exe" >NUL if ERRORLEVEL 1 echo "program is running" if ERRORLEVEL 2 start notepad.exe PAUSE MOD EDIT: PLEASE...
- 17 Oct 2014 08:03
- Forum: DOS Batch Forum
- Topic: Batch file to check a process that running on other PC
- Replies: 12
- Views: 9946
Re: Batch file to check a process that running on other PC
what do you mean about the delayed expansion? Thanks.
- 17 Oct 2014 07:53
- Forum: DOS Batch Forum
- Topic: Batch file to check a process that running on other PC
- Replies: 12
- Views: 9946
Re: Batch file to check a process that running on other PC
I can run this command in command promt: tasklist /S dom-dnfconfig /U dom-dnfconfig\systemadm /P P$5$C$! /fi "IMAGENAME eq notepad.exe" But, when I put it in the batch file, it gave me an error with unknown username or bad password. Could you please let me know what is wrong with it? Thanks.
- 17 Oct 2014 06:35
- Forum: DOS Batch Forum
- Topic: Batch file to check a process that running on other PC
- Replies: 12
- Views: 9946
Batch file to check a process that running on other PC
Hello all,
Is there a way that a batch file can check a process that is running on other PC on the same network? For instance, if I need to check to see notepad.exe is running on mypc1, before it runs notepad.exe on mypc2. Both mypc1 and mypc2 are on the same network. Thanks for your help.
Is there a way that a batch file can check a process that is running on other PC on the same network? For instance, if I need to check to see notepad.exe is running on mypc1, before it runs notepad.exe on mypc2. Both mypc1 and mypc2 are on the same network. Thanks for your help.
- 03 Oct 2014 11:13
- Forum: DOS Batch Forum
- Topic: Move all files to a different direcotry except one file
- Replies: 8
- Views: 6988
Re: Move all files to a different direcotry except one file
Thank you so much for your help. It is working now. Have a good weekend.
- 03 Oct 2014 10:22
- Forum: DOS Batch Forum
- Topic: Move all files to a different direcotry except one file
- Replies: 8
- Views: 6988
Re: Move all files to a different direcotry except one file
Thanks for the reply. Here is the modified code, but it is still not working. @echo off cls set "source_dir=F:\log 1" set "target_dir=F:\log 2" for /f "skip=1 delims=" %%A in ('dir %source_dir% /b /o-d') do ( move "%source_dir%\%%A" "%target_dir%" ) ...
- 03 Oct 2014 07:37
- Forum: DOS Batch Forum
- Topic: Move all files to a different direcotry except one file
- Replies: 8
- Views: 6988
Re: Move all files to a different direcotry except one file
Sorry. It is only working for the folder that has no space in it. What do I need to do with a space in the source and target directory name? Thanks.
C:\Program Files (x86)\Microsoft SQL Server Compact Edition
Thanks.
C:\Program Files (x86)\Microsoft SQL Server Compact Edition
Thanks.
- 07 Aug 2014 08:34
- Forum: DOS Batch Forum
- Topic: Move all files to a different direcotry except one file
- Replies: 8
- Views: 6988
Re: Move all files to a different direcotry except one file
It works very well. Thank you so much for your help.
- 07 Aug 2014 07:59
- Forum: DOS Batch Forum
- Topic: Move all files to a different direcotry except one file
- Replies: 8
- Views: 6988
Move all files to a different direcotry except one file
Hello all,
I need some help to write an bat file that will move all the file to a different directory except for one file with the lastest date stamp? Thanks for your help.
I need some help to write an bat file that will move all the file to a different directory except for one file with the lastest date stamp? Thanks for your help.