From: GrJ Computers, Javi, essejc, on
Hey, I am actually running it on command prompt but I couldn't find where to
put it and i figure this is the closest thing to it. A script will work but I
prefer command line. Either one, I will be greatful. :)

I am running this on schedule task:
"C:\Program Files\Ipswitch\WS_FTP Professional\wsftppro56.exe" -s "FIS LPS
ClientExtracts IMPORT:/ProcessManagement/*" -d
"local:\\as1\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\"

This will call on the software and run the job. The job will copy the files
on the remote folder and place them on a local drive (local:\\as1)
What I want to do is to have the task call on the software, run the job, and
when done copying the files, DELETE them. If I can get it to cut and paste to
local, that works too. i am running it on Schedule task RUN: so the syntax is
the same as it will be on command prompt but I have no problem calling on a
script if thats necessary. Any help is grateful. Even if its pointing to the
direction of where I'll get more help. Thanks.


From: Pegasus [MVP] on

"GrJ Computers, Javi, essejc,"
<GrJComputersJaviessejc(a)discussions.microsoft.com> wrote in message
news:3A3C95F3-99A8-4CAD-B65F-D66CFE88C6E7(a)microsoft.com...
> Hey, I am actually running it on command prompt but I couldn't find where
> to
> put it and i figure this is the closest thing to it. A script will work
> but I
> prefer command line. Either one, I will be greatful. :)
>
> I am running this on schedule task:
> "C:\Program Files\Ipswitch\WS_FTP Professional\wsftppro56.exe" -s "FIS LPS
> ClientExtracts IMPORT:/ProcessManagement/*" -d
> "local:\\as1\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\"
>
> This will call on the software and run the job. The job will copy the
> files
> on the remote folder and place them on a local drive (local:\\as1)
> What I want to do is to have the task call on the software, run the job,
> and
> when done copying the files, DELETE them. If I can get it to cut and paste
> to
> local, that works too. i am running it on Schedule task RUN: so the syntax
> is
> the same as it will be on command prompt but I have no problem calling on
> a
> script if thats necessary. Any help is grateful. Even if its pointing to
> the
> direction of where I'll get more help. Thanks.

Since you prefer a "command line" solution, here is a batch file that will
do the trick:
@echo off
"C:\Program Files\Ipswitch\WS_FTP Professional\wsftppro56.exe" -s "FIS LPS
ClientExtracts IMPORT:/ProcessManagement/*" -d
"local:\\as1\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\"
del /Q
\\as1\\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\*.*

The name(s) of the file(s) you wish to delete is not too clear from your
description, hence you must check the above code carefully. Save it as
"c:\GrJ.bat", for example, then use the Task Scheduler to run c:\GrJ.bat.


From: GrJ Computers, Javi, essejc, on
Thank you. The code you provide deletes the files from \\as01. I need the
batch to delete the files from the remote connection /ClientExtracts. I
switch the directories, does it look correct? All we are copying at .txt
files. Also, is there to set it so that it only delete the files of certain
age? such as two days..

Thanks,

@echo off

"C:\Program Files\Ipswitch\WS_FTP Professional\wsftppro56.exe" -s "FIS LPS
ClientExtracts IMPORT:/ProcessManagement/PMIssi/ClientExtracts/*" -d
"local:\\as1\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\

"del /Q C:\Program Files\Ipswitch\WS_FTP Professional\wsftppro56.exe" -s
"FIS LPS ClientExtracts IMPORT:/ProcessManagement/* "C:\Program
Files\Ipswitch\WS_FTP Professional\wsftppro.exe" -s "FIS LPS
ClientExtracts IMPORT:/ProcessManagement/*" -d
"local:\\as1\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\"

"Pegasus [MVP]" wrote:

>
> "GrJ Computers, Javi, essejc,"
> <GrJComputersJaviessejc(a)discussions.microsoft.com> wrote in message
> news:3A3C95F3-99A8-4CAD-B65F-D66CFE88C6E7(a)microsoft.com...
> > Hey, I am actually running it on command prompt but I couldn't find where
> > to
> > put it and i figure this is the closest thing to it. A script will work
> > but I
> > prefer command line. Either one, I will be greatful. :)
> >
> > I am running this on schedule task:
> > "C:\Program Files\Ipswitch\WS_FTP Professional\wsftppro56.exe" -s "FIS LPS
> > ClientExtracts IMPORT:/ProcessManagement/*" -d
> > "local:\\as1\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\"
> >
> > This will call on the software and run the job. The job will copy the
> > files
> > on the remote folder and place them on a local drive (local:\\as1)
> > What I want to do is to have the task call on the software, run the job,
> > and
> > when done copying the files, DELETE them. If I can get it to cut and paste
> > to
> > local, that works too. i am running it on Schedule task RUN: so the syntax
> > is
> > the same as it will be on command prompt but I have no problem calling on
> > a
> > script if thats necessary. Any help is grateful. Even if its pointing to
> > the
> > direction of where I'll get more help. Thanks.
>
> Since you prefer a "command line" solution, here is a batch file that will
> do the trick:
> @echo off
> "C:\Program Files\Ipswitch\WS_FTP Professional\wsftppro56.exe" -s "FIS LPS
> ClientExtracts IMPORT:/ProcessManagement/*" -d
> "local:\\as1\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\"
> del /Q
> \\as1\\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\*.*
>
> The name(s) of the file(s) you wish to delete is not too clear from your
> description, hence you must check the above code carefully. Save it as
> "c:\GrJ.bat", for example, then use the Task Scheduler to run c:\GrJ.bat.
>
>
> .
>
From: Pegasus [MVP] on
Your response is unclear. The location I suggested (\\as1\\CorpData\IT) *is*
a remote location whereas the string "/ClientExtracts" is a switch or a
parameter but *not* a remote location.

If you with to delete files by age then you could use one of the following
options:

a) Write a VB Script based on the File System Object so
that you can examine the date stamp of each file before
deleting the file itself. If you prefer this option then writing
some of the basic code yourself before asking for help
on the finer details would be good starting point.
b) Write a batch file based on xxcopy.exe and use the facility
built into this tool to delete files by age. If you prefer this
option then you should download xxcopy.exe from
http://www.xxcopy.com/xxcopy/, then repost your
question in alt.msdos.batch.nt if you need more help
since it is a batch file query, not a VB Script question.

"GrJ Computers, Javi, essejc,"
<GrJComputersJaviessejc(a)discussions.microsoft.com> wrote in message
news:F43E22D9-34FE-4452-92CD-817B4BBC30E3(a)microsoft.com...
> Thank you. The code you provide deletes the files from \\as01. I need the
> batch to delete the files from the remote connection /ClientExtracts. I
> switch the directories, does it look correct? All we are copying at .txt
> files. Also, is there to set it so that it only delete the files of
> certain
> age? such as two days..
>
> Thanks,
>
> @echo off
>
> "C:\Program Files\Ipswitch\WS_FTP Professional\wsftppro56.exe" -s "FIS LPS
> ClientExtracts IMPORT:/ProcessManagement/PMIssi/ClientExtracts/*" -d
> "local:\\as1\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\
>
> "del /Q C:\Program Files\Ipswitch\WS_FTP Professional\wsftppro56.exe" -s
> "FIS LPS ClientExtracts IMPORT:/ProcessManagement/* "C:\Program
> Files\Ipswitch\WS_FTP Professional\wsftppro.exe" -s "FIS LPS
> ClientExtracts IMPORT:/ProcessManagement/*" -d
> "local:\\as1\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\"
>
> "Pegasus [MVP]" wrote:
>
>>
>> "GrJ Computers, Javi, essejc,"
>> <GrJComputersJaviessejc(a)discussions.microsoft.com> wrote in message
>> news:3A3C95F3-99A8-4CAD-B65F-D66CFE88C6E7(a)microsoft.com...
>> > Hey, I am actually running it on command prompt but I couldn't find
>> > where
>> > to
>> > put it and i figure this is the closest thing to it. A script will work
>> > but I
>> > prefer command line. Either one, I will be greatful. :)
>> >
>> > I am running this on schedule task:
>> > "C:\Program Files\Ipswitch\WS_FTP Professional\wsftppro56.exe" -s "FIS
>> > LPS
>> > ClientExtracts IMPORT:/ProcessManagement/*" -d
>> > "local:\\as1\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\"
>> >
>> > This will call on the software and run the job. The job will copy the
>> > files
>> > on the remote folder and place them on a local drive (local:\\as1)
>> > What I want to do is to have the task call on the software, run the
>> > job,
>> > and
>> > when done copying the files, DELETE them. If I can get it to cut and
>> > paste
>> > to
>> > local, that works too. i am running it on Schedule task RUN: so the
>> > syntax
>> > is
>> > the same as it will be on command prompt but I have no problem calling
>> > on
>> > a
>> > script if thats necessary. Any help is grateful. Even if its pointing
>> > to
>> > the
>> > direction of where I'll get more help. Thanks.
>>
>> Since you prefer a "command line" solution, here is a batch file that
>> will
>> do the trick:
>> @echo off
>> "C:\Program Files\Ipswitch\WS_FTP Professional\wsftppro56.exe" -s "FIS
>> LPS
>> ClientExtracts IMPORT:/ProcessManagement/*" -d
>> "local:\\as1\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\"
>> del /Q
>> \\as1\\CorpData\IT\SQLSupport\IntegrationServices\ETL_LPS\Data\Inbound\*.*
>>
>> The name(s) of the file(s) you wish to delete is not too clear from your
>> description, hence you must check the above code carefully. Save it as
>> "c:\GrJ.bat", for example, then use the Task Scheduler to run c:\GrJ.bat.
>>
>>
>> .
>>