on 12-04-2008 9:19 AM
Hi MDM Guru's,
I want to delete files in the inbound archive folder of my repositoires. My MDM system runs on Unix, its not windows based.
How can i schedule a back ground task to delete these files, keeping the last week files only? Could it be done using clix, any Sql based commands or any........................
Please guide me.
Thanks in advance
Cheers
Srihari Reddy
Hi Srihari,
I don't think this task can be possible using MDM CLIX or SQL commands.
As your requirement is to keep only those files that are not more than 7 days old; so this can be done using MS-DOS or VB Script.
After creating the script, you can schedule it according to your business requirement.
Please find the VB Script for it:
Dim oFSO, oFolder, oFiles, oFile, iDaysOld
iDaysOld=7
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSO.GetFolder("C:\TEST")
Set oFiles = oFolder.Files
For each oFile in oFiles
If oFile.DateLastModified < (Date() - iDaysOld) Then
oFile.Delete(True)
End If
Next
oFolder will contain the location of the files.
Regards,
Varun
Edited by: Varun Agarwal on Dec 4, 2008 4:21 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes you can delete the files present in Ready and Archive folder.
Follow the below steps:
1. Create a text file which contain the below lines:
cd {MDM Installation Path}\Server\......\Archive
del star . star /q
Note: Instead of writing "star" use star symol
E.g. C:\Program Files\SAP MDM 5.5 Server\Distributions\Test-MDM_MSQL\Test-Repo\Inbound\Remote_sys\Inbound_port\Archive
2. Save the file with .bat extension in C drive.
3. You can schedule this file using Windows Schedular. For this go to Start -> Programs -> Accessories -> System Tools -> Scheduled Tasks and create a new one by double clicking on it. Select the bat file created and accordindly schedule it like daily, weekly etc.
4. Now whenever the task is due it automatically executes the commands written in bat file and deletes all the files from Archives folder.
Regards,
Jitesh Talreja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srihari,
We need to delete the files in the archieve folder manually.
At present we dont have any clix command or Gui based commands to delete these files.
Hope it helps.
Thanks,
Minaz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.