Re: Batch File Rename + Date added & Move to another location

Tech-Archive recommends: Fix windows errors by optimizing your registry



On 17 Jan 2007 03:32:59 -0800, carla_cund@xxxxxxxxxxx wrote:

I need to run a batch file which will go to this location
c:\perflogs\networksops2.csv and move this file to a level down
c:\perflogs\archivedperflogs and rename the file keeping the original
name but adding a date to it ie networkops220070117.csv

This needs to be run every week on a schedule. The original location
every week will have the c:\perflogs\networksops2.csv file added by a
performance log. I need to then archive this data off so it is not
overwritten every week

Try this: (untested)

@echo off
:: Code by Herbert Kleebauer
echo Bj@jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=>d_t.com
echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU WwX0GwUY Wv;ovBX2Gv0ExGIuht6>>d_t.com
echo LisqMz`wGH@wKuur`G@w?ogBgGG}G?j_egoNOG?w?`gBLksqgG`w?WgBgG>>d_t.com
echo G}G?R_MgoNMy?wSx@W?s?W?@zAB`LrFuBLyt~vuco{@LuKooD?BFHqrIcP>>d_t.com
echo _sdDxb1T??=?rILO_sdDqx1T??=?rILO_sdDnl1T??=?rILO_sdD`c1T??>>d_t.com
echo =?rILO_sdDgg1T??=?rILO_sdDll1T??=?rILO_sdDrr1T??=??IL?0xxx>>d_t.com

d_t.com>d_t.bat
call d_t.bat
del d_t.com
del d_t.bat

echo century: %_cy%
echo year: %_yr%
echo month: %_mo%
echo day: %_da%
echo hour: %_hh%
echo minute: %_mm%
echo second: %_ss%

move c:\perflogs\networksops2.csv
c:\perflogs\archivedperflogs\networksops2%_cy%%_yr%%_mo%%_da%.csv


.



Relevant Pages

  • Re: Scheduled Task error code:The task completed with an exit code
    ... echo %fileDATE%>filedate.txt ... if exist concatdate.txt del /q concatdate.txt ... You consistently fail to specify a drive and a path for your ... *** You must specify the exact file locations. ...
    (microsoft.public.windows.server.general)
  • Re: cc65 and "Hello World"
    ... There is a section in the Aztec C ReadMe about starting Aztec C SYS ... Many ProDOS system programs created using Aztec C65 will crash ... del time.r ... @echo cinit.ovr now created! ...
    (comp.sys.apple2.programmer)
  • Re: find and remove duplicate files
    ... > What are those strings of characters? ... echo commands. ... wit a "del " ...
    (microsoft.public.win2000.cmdprompt.admin)
  • RE: comments
    ... operating system. ... @echo off ... echo COUNTRY: DENMARK>>info.txt ... del ncurses.tar.gz ...
    (freebsd-questions)
  • Re: Batch file for cleaning up
    ... Cleaning the TIF folders using del and all files will only create ... Delete/Empty Temporary Internet Cache completely ... > echo * CCC L OOO SSS EEE * ...
    (microsoft.public.windows.inetexplorer.ie6.browser)