Search found 16 matches

by newbie2013
21 Sep 2014 21:03
Forum: DOS Batch Forum
Topic: Delete files older than 7 days with log file and history
Replies: 2
Views: 6859

Delete files older than 7 days with log file and history

I am using below command in batch file to delete files older than 7 days and scheduled it daily. It is working fine. forfiles -p "D:\Target\ReportOutput" -s -m *.* /D -7 /C "cmd /c del @path" I would like to track the files it is deleting daily. Please give me a code to have a lo...
by newbie2013
16 Sep 2014 18:31
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

foxidrive wrote:Try the code in my post above. I changed "%replsource%\repl" to "%replsource%\repl.bat"


Thank you so much. It is perfectly fine with added features (Batch file in a different folder and log file). I appreciate your efforts. Thanks a ton.
by newbie2013
15 Sep 2014 00:57
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

Run the code above and show me what it lists on the screen. Copy and paste the console text to a reply. Here is the output. "D:\Source" "D:\Batch Files - IMPORTANT\repl" "166820_1410380002593_desc.xml" "205586_1410380022234_desc.xml" "206395_141038019051...
by newbie2013
14 Sep 2014 23:54
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

Aacini wrote:
Antonio


Apologies for the situation I have put you in.
by newbie2013
14 Sep 2014 08:29
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

EDITED Test this out on a sample folder of files - it works with your test files. Code is working perfectly for my requirement. Really really happy. Thank you. I have few clarifications. 1) After rename, file is not giving the correct file type. 166820_1410380002593.mht >>>>>>> MGT 9 - Project Tran...
by newbie2013
12 Sep 2014 03:01
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

foxidrive wrote:EDITED

This uses a helper batch file called `repl.bat` (by dbenham) - download from: https://www.dropbox.com/s/qidqwztmetbvklt/repl.bat

Place `repl.bat` in the same folder as the batch file or in a folder that is on the path.


Can you please share the code in repl.bat? It is not opening for me.
by newbie2013
11 Sep 2014 19:58
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

can you give an example xml I am using below code as Daily.bat along with XSLT.bat. Both bat files are being kept in the same folder. @echo off :: this batch needs cmd /A switch set; see cmd /? if NOT "%~1" == "initialized" ( cmd /D /A /C %~dpnx0 "initialized" goto end...
by newbie2013
11 Sep 2014 18:01
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

Where is this string? Is it a fixed string? Below code has been provided by Antonio, it is perfectly working to find the string. I am using "Allison Project ID Project Manager=" string to identify the files. It is a fixed string. @echo off setlocal EnableDelayedExpansion rem 1- I have a d...
by newbie2013
11 Sep 2014 03:05
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

Sorry, was not able to test this. I will test this and let you know the feedback. Thank you very much everyone for your response.Sorry, I was not able to get back to you as it took some time for me to gather exact requirements. Antonio code is working perfectly fine, but it has to be modified for c...
by newbie2013
04 Sep 2014 06:04
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

Sorry, was not able to test this. I will test this and let you know the feedback.
by newbie2013
30 Aug 2014 07:42
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

Antonio Hi Antonio, The code you have provided me is able to search the string and identify the file name, but it is not moving to different directory based on the selection. I have modified code that you have provided as below. Still the file is not moving to target directory. rem 4- File name tha...
by newbie2013
28 Aug 2014 23:01
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

Now you should be able to copy the content in a valid manner. Regards aGerman I am also copying the content as suggested by you. <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2007 Cognos Incorporated. All Rights Reserved. Cognos (R) is a trademark of Cognos Incorpora...
by newbie2013
28 Aug 2014 22:52
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

foxidrive wrote:The forum does not have storage for files. but you can use Dropbox or any other web storage to save the file to and put the link in a reply.


Please find the dropbox URL. Hope this works.

[url]

https://www.dropbox.com/s/nvj902dbdk152 ... c.xml?dl=0

[/url]
by newbie2013
27 Aug 2014 23:16
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

original format of the file wrt line breaks - can you put an accurate file up for download? I am sorry to ask you this silly question. I am not finding any option on this post to upload the XML file. If the option to upload is not available, please tell me the process/format to put the file here so...
by newbie2013
27 Aug 2014 19:18
Forum: DOS Batch Forum
Topic: Move the searched file from XML to a directory batch file
Replies: 35
Views: 21138

Re: Move the searched file from XML to a directory batch fil

Thank you for your prompt reply. Please see XML sample. Squashman, please give me VB script also. <?xml version="1.0" encoding="utf-8" ?> - <!-- Copyright (C) 2007 Cognos Incorporated. All Rights Reserved. Cognos (R) is a trademark of Cognos Incorporated. --> - <!-- Experimental....