Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Execute Command stage

Execute Command stage

Execute Command stage


I'm using in Execute Command stage to call a DOS batch script that in turn runs .bat, my parameters is:

Command: @
Parameters: "#seq_path#\#APORIProcessDeleteFile#" ( \\filedev\ETLDataFiles\Devl\DM\XXX\Test1\deletefile.bat )

But I have trouble because it does not make the call to the script: the contents of the bat is as follows:
(Delete files with more than 6 months)

@echo off
set cutOff=%~2
set workDir=%~1
if "%1"=="" set workDir=.
if not "%cutOff%"=="" goto START

for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (
set mm=%%a
set dd=%%b
set yyyy=%%c

set /a mm=1%mm% -6 - 101
if /i %mm% LSS 1 set /a mm=12&set /a yyyy-=1
if /i %mm% LSS 10 set mm=0%mm%
set cutOff=%yyyy%%mm%%dd%

cd /D "%workDir%"

for /f "delims=" %%a in ('dir /b /a-d 2^>NUL') do if /i "%%a" NEQ "%0" call :PROCESS "%%a" %%~ta

goto :EOF

for /f "tokens=1-3 delims=/" %%a in ('echo %2') do (
set cmm=%%a
set cdd=%%b
set cyyyy=%%c

if /i "%cyyyy%%cmm%%cdd%" LEQ "%cutOff%" del %1

Thanks advanced.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close