on 11-03-2008 5:58 AM
Hi SDNers,
I have a requirement to delete the already processed inbound archived files. Is it possible to delete them
Thanks in Advance
Dilmit Chadha
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.
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 Jitesh,
I have tried doing this part of scheduling the bat file. But my files are not getting deleted from archive folder. In the .bat file I have written the following things:
cd cd {MDM Installation Path}\Server\......\Archive
del star . star
and then I have scheduled this file to be run in windows scheduller. But after this, files were not deleted from the archive folder
Please let me know if I am missing something.
Thanks & Regards
Dilmit Chadha
You might be interested in this small piece of Windows command file which I wrote to delete files over 60 days old from all the port distribution folders. The script will read the MDM mds.ini file to determine the location of the distribution directory, then execute the windows 'Forfiles' command recursively in that directory and delete any xml file over 60 days old. You should be able to adjust this slightly for your needs.
set root=
for /f "delims== tokens=1,2 usebackq" %%i in ("d:\program files\sap mdm 5.5\server\mds.ini") do if "%%i"=="Distribution Root Dir" set root=%%j
if "%root%"=="" (
echo No import server distribution directory found
) else (
pushd %root%
forfiles /s /d -60 /m *.xml /c "cmd /c del /q @path"
popd
)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.