Re: copy bat
- From: "Pegasus \(MVP\)" <I.can@xxxxxxx>
- Date: Wed, 14 Nov 2007 19:16:13 +0100
I agree - looks like a very useful command, but as you say,
probably not suitable for the purpose he OP had in mind.
"Paul Randall" <paulr901@xxxxxxxxxxxx> wrote in message
news:uYs1OBuJIHA.2064@xxxxxxxxxxxxxxxxxxxxxxx
I think logparser would be a good tool to have in your bag of tricks:
http://support.microsoft.com/kb/910447
I think that the OP's problem is that he is telling logparser to create a
list of candidate file names in a .BAT file, but what he really needs is a
list of commands that process those file names, or maybe a script that can
process all the file names in a list.
-Paul Randall
"Pegasus (MVP)" <I.can@xxxxxxx> wrote in message
news:OWtz1ltJIHA.3672@xxxxxxxxxxxxxxxxxxxxxxx
I don't know what "logparser" is. If this was my machine then
I would use a script like this one:
@echo off
set Age=7
set Source=c:\Andrea
set Target=d:\Backup\
xxcopy /db#%Age% /s /d /c /y "%Source%" "%Target%"
You can download xxcopy.exe from a number of sites.
"luca" <luca@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A60431DF-4384-4B2D-920D-1304FE584587@xxxxxxxxxxxxxxxx
Ok . I try, sorry for my english...
I must copy file more old of 7 days . For this I use logparser with this
scipt:
logparser "select path from c:\test\*.* where
div(sub(to_int(system_date()),to_int(to_date(creationtime))),86400)>7" -i:FS
-q:on
The result og logparser must be copied in another folder. Iwould use
this
for /F %i in ('logparser "select path from c:\andrea\*.* where
div(sub(to_int(system_date()),to_int(to_date(creationtime))),86400)>7" -i:FS
-q:on'
But when I save this script as .bat or .cmd I have an error when I
lunch.
So I think if I write this one:
for /F %i in ('logparser "select path from c:\andrea\*.* where
div(sub(to_int(system_date()),to_int(to_date(creationtime))),86400)>7" -i:FS
-q:on'>>test.bat
The result of logparser go in the .bat file. But then how make the copy
from
test.bat file?
Thank's a lot
Luca
"Pegasus (MVP)" wrote:
"luca" <luca@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1475B744-12BE-4171-8C48-62D878F27DD8@xxxxxxxxxxxxxxxx
Sorry,
one questions.
I would copy a file that are in the bat file. For example if I open
my bat
file I look this:
C:\test1
C:\test\test2
etc.
I Would copy this file (by batch or script) in another destination.
Is it
possible?
Thank's
luca
It's probably possible but I am unable to understand your
question. Please rephrase it.
.
- References:
- Re: copy bat
- From: Pegasus \(MVP\)
- Re: copy bat
- From: Pegasus \(MVP\)
- Re: copy bat
- From: Paul Randall
- Re: copy bat
- Prev by Date: Re: copy bat
- Next by Date: Re: copy bat
- Previous by thread: Re: copy bat
- Next by thread: Re: copy bat
- Index(es):
Relevant Pages
|