![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Windows & DOS: Issues & Discussions Questions involving Unix to Windows (Desktop or Server) go here. Any Windows/DOS questions should go here as well. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script required to get a required info from file. Pls. help me. | ntgobinath | Shell Programming and Scripting | 2 | 05-31-2008 05:34 AM |
| Script Required | Satadru | Shell Programming and Scripting | 1 | 05-08-2008 09:38 AM |
| Script required | ntgobinath | Shell Programming and Scripting | 1 | 05-08-2008 08:35 AM |
| script required | skyineyes | Shell Programming and Scripting | 13 | 06-26-2007 10:49 PM |
| Script help required! | kev112 | Shell Programming and Scripting | 8 | 05-24-2005 01:33 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
As i am new to unix.i need a scrip for the below purpose
can unix script be used in windows ?? if so.. in my server with in a day, it generates log file to a size of minimun 3 GB in c drive by an application..which i need to manually cut and paste it F drive and then compress or zip. for eg c:\hamsfa\site\001]log\.... -source to f:\hamsfa_log\001\ destination required is.. the scripts first shuld zip the files which are older than 2 days inside c drive and then move it to f drive destination even if this can been written in batch file.. that will be ok for me |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
We should probably move this thread to our Dos forum. What version of Windows? What program are you using to zip? Do you actually have unix running somewhere?
|
|
#3
|
|||
|
|||
|
script reply
Hi
i will be running this for an application called hamilotn. which has a log folder that gets filled up to GB with a day,the platform that i am using is winodws 2003 server, either winzip or windows compression (optional).after such script is made then this will handed to job scheduling team who will schedule the script to run in a period of day .. if this script can composed as batch file is also ok |
|
#4
|
||||
|
||||
|
It is not easy to manipulate pathnames in a bat file, but I think I got it. I created a file called logjob.bat
Code:
@echo off setlocal set destdrive=f set source=%1 set sourcedrive=%~d1 set var1=%~p1 set var2=%var1:\= % call :procdir %var2% echo source = %source% echo dest = %dest% goto :final :procdir set dest=%destdrive%:\%1_%4\%3\ exit /b :final endlocal Code:
C:\Data Files\utils> C:\Data Files\utils> C:\Data Files\utils> C:\Data Files\utils> C:\Data Files\utils> C:\Data Files\utils>logjob c:\hamsfa\site\001\log\ source = c:\hamsfa\site\001\log\ dest = f:\hamsfa_log\001\ C:\Data Files\utils> |
||||
| Google The UNIX and Linux Forums |