Forum Search:
Forum.Brain-Cluster.com: Brain Cluster Technical Forum
Ultimate forum for Technical Discussions

Home » Microsoft » Windows Server » Windows Server General Help » For files command problem
For files command problem [message #164332] Sat, 20 June 2009 08:55 Go to next message
Gopal  is currently offline Gopal
Messages: 11
Registered: July 2009
Junior Member
Hi,
On WIN 2003 EE r2.We have a activity to move two year old files from
E:\Accounts folder to F:\Accounts folder.We were used below command to got
it but so many files were overwritten.We dont want that.How was the folder
structure in E:\Accounts before moving to be created in F:\Accounts folder
and then move this is not happend if its done we can avoid files overwritten.
Is it possible using Forfiles command.

E:\Accounts>forfiles /s /m *.* /d -730 /c "cmd /c if @isdir==FALSE move
@path F:\Accounts"
Re: For files command problem [message #164333 is a reply to message #164332] Sat, 20 June 2009 10:14 Go to previous messageGo to next message
news  is currently offline news  Switzerland
Messages: 2294
Registered: July 2009
Senior Member
"Gopal" <Gopal@discussions.microsoft.com> wrote in message
news:58A8C13F-C584-4F02-B24D-0C63576EE4EB@microsoft.com...
> Hi,
> On WIN 2003 EE r2.We have a activity to move two year old files from
> E:\Accounts folder to F:\Accounts folder.We were used below command to
> got
> it but so many files were overwritten.We dont want that.How was the folder
> structure in E:\Accounts before moving to be created in F:\Accounts
> folder
> and then move this is not happend if its done we can avoid files
> overwritten.
> Is it possible using Forfiles command.
>
> E:\Accounts>forfiles /s /m *.* /d -730 /c "cmd /c if @isdir==FALSE move
> @path F:\Accounts"

I tried on several occasions to wrap my mind around the weird and wonderful
syntax of the forfiles command and I failed every time. I recommend you use
robocopy.exe instead. It has a "move" switch and an "age" option.
Re: For files command problem [message #164334 is a reply to message #164333] Sat, 20 June 2009 11:27 Go to previous messageGo to next message
Gopal  is currently offline Gopal
Messages: 11
Registered: July 2009
Junior Member
Thaks for u r reply.If possible could you provide robocopy commnad which is
suitable for my requierment.

"Pegasus [MVP]" wrote:

>
> "Gopal" <Gopal@discussions.microsoft.com> wrote in message
> news:58A8C13F-C584-4F02-B24D-0C63576EE4EB@microsoft.com...
> > Hi,
> > On WIN 2003 EE r2.We have a activity to move two year old files from
> > E:\Accounts folder to F:\Accounts folder.We were used below command to
> > got
> > it but so many files were overwritten.We dont want that.How was the folder
> > structure in E:\Accounts before moving to be created in F:\Accounts
> > folder
> > and then move this is not happend if its done we can avoid files
> > overwritten.
> > Is it possible using Forfiles command.
> >
> > E:\Accounts>forfiles /s /m *.* /d -730 /c "cmd /c if @isdir==FALSE move
> > @path F:\Accounts"
>
> I tried on several occasions to wrap my mind around the weird and wonderful
> syntax of the forfiles command and I failed every time. I recommend you use
> robocopy.exe instead. It has a "move" switch and an "age" option.
>
>
>
Re: For files command problem [message #164339 is a reply to message #164334] Sat, 20 June 2009 15:28 Go to previous messageGo to next message
news  is currently offline news  Switzerland
Messages: 2294
Registered: July 2009
Senior Member
Try this:
robocopy /? > c:\robocopy.txt
notepad c:\robocopy.txt


"Gopal" <Gopal@discussions.microsoft.com> wrote in message
news:CE0B3C2A-88F8-4271-8469-22B282B6888C@microsoft.com...
> Thaks for u r reply.If possible could you provide robocopy commnad which
> is
> suitable for my requierment.
>
> "Pegasus [MVP]" wrote:
>
>>
>> "Gopal" <Gopal@discussions.microsoft.com> wrote in message
>> news:58A8C13F-C584-4F02-B24D-0C63576EE4EB@microsoft.com...
>> > Hi,
>> > On WIN 2003 EE r2.We have a activity to move two year old files from
>> > E:\Accounts folder to F:\Accounts folder.We were used below command to
>> > got
>> > it but so many files were overwritten.We dont want that.How was the
>> > folder
>> > structure in E:\Accounts before moving to be created in F:\Accounts
>> > folder
>> > and then move this is not happend if its done we can avoid files
>> > overwritten.
>> > Is it possible using Forfiles command.
>> >
>> > E:\Accounts>forfiles /s /m *.* /d -730 /c "cmd /c if @isdir==FALSE move
>> > @path F:\Accounts"
>>
>> I tried on several occasions to wrap my mind around the weird and
>> wonderful
>> syntax of the forfiles command and I failed every time. I recommend you
>> use
>> robocopy.exe instead. It has a "move" switch and an "age" option.
>>
>>
>>
Re: For files command problem [message #164345 is a reply to message #164339] Sun, 21 June 2009 03:32 Go to previous message
Admin  is currently offline Admin
Messages: 27
Registered: September 2009
Junior Member
Thanks a lot
"Pegasus [MVP]" <news@microsoft.com> wrote in message
news:etxjH1d8JHA.3556@TK2MSFTNGP04.phx.gbl...
> Try this:
> robocopy /? > c:\robocopy.txt
> notepad c:\robocopy.txt
>
>
> "Gopal" <Gopal@discussions.microsoft.com> wrote in message
> news:CE0B3C2A-88F8-4271-8469-22B282B6888C@microsoft.com...
>> Thaks for u r reply.If possible could you provide robocopy commnad which
>> is
>> suitable for my requierment.
>>
>> "Pegasus [MVP]" wrote:
>>
>>>
>>> "Gopal" <Gopal@discussions.microsoft.com> wrote in message
>>> news:58A8C13F-C584-4F02-B24D-0C63576EE4EB@microsoft.com...
>>> > Hi,
>>> > On WIN 2003 EE r2.We have a activity to move two year old files from
>>> > E:\Accounts folder to F:\Accounts folder.We were used below command
>>> > to
>>> > got
>>> > it but so many files were overwritten.We dont want that.How was the
>>> > folder
>>> > structure in E:\Accounts before moving to be created in F:\Accounts
>>> > folder
>>> > and then move this is not happend if its done we can avoid files
>>> > overwritten.
>>> > Is it possible using Forfiles command.
>>> >
>>> > E:\Accounts>forfiles /s /m *.* /d -730 /c "cmd /c if @isdir==FALSE
>>> > move
>>> > @path F:\Accounts"
>>>
>>> I tried on several occasions to wrap my mind around the weird and
>>> wonderful
>>> syntax of the forfiles command and I failed every time. I recommend you
>>> use
>>> robocopy.exe instead. It has a "move" switch and an "age" option.
>>>
>>>
>>>
>
>
Previous Topic:Re: Error 1719 Windows Installer Service Cannot be accessed
Next Topic:Re: SNMP Monitoring toll problem
Goto Forum:
  


Current Time: Sun Aug 20 18:53:03 EDT 2017

Total time taken to generate the page: 0.04381 seconds
.:: Contact :: Home ::Sitemap::.

Powered by: FUDforum 3.0.0RC2.
Copyright ©2001-2009 FUDforum Bulletin Board Software