Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Delete files after copy completes or move files or cut/paste
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
 
View profile  
 More options Nov 14 2009, 1:11 am
Newsgroups: microsoft.public.scripting.vbscript
From: GrJ Computers, Javi, essejc, <GrJComputersJaviess...@discussions.microsoft.com>
Date: Fri, 13 Nov 2009 17:11:01 -0800
Local: Sat, Nov 14 2009 1:11 am
Subject: Delete files after copy completes or move files or cut/paste
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\Inboun d\"

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.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pegasus [MVP]  
View profile  
 More options Nov 14 2009, 7:31 am
Newsgroups: microsoft.public.scripting.vbscript
From: "Pegasus [MVP]" <n...@microsoft.com>
Date: Sat, 14 Nov 2009 08:31:03 +0100
Local: Sat, Nov 14 2009 7:31 am
Subject: Re: Delete files after copy completes or move files or cut/paste

"GrJ Computers, Javi, essejc,"

<GrJComputersJaviess...@discussions.microsoft.com> wrote in message

news:3A3C95F3-99A8-4CAD-B65F-D66CFE88C6E7@microsoft.com...

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\Inboun d\"
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.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
 
View profile  
 More options Nov 15 2009, 1:41 am
Newsgroups: microsoft.public.scripting.vbscript
From: GrJ Computers, Javi, essejc, <GrJComputersJaviess...@discussions.microsoft.com>
Date: Sat, 14 Nov 2009 17:41:03 -0800
Local: Sun, Nov 15 2009 1:41 am
Subject: Re: Delete files after copy completes or move files or cut/paste
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\Inboun d\

"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\Inboun d\"


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pegasus [MVP]  
View profile  
 More options Nov 15 2009, 8:32 am
Newsgroups: microsoft.public.scripting.vbscript
From: "Pegasus [MVP]" <n...@microsoft.com>
Date: Sun, 15 Nov 2009 09:32:39 +0100
Local: Sun, Nov 15 2009 8:32 am
Subject: Re: Delete files after copy completes or move files or cut/paste
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,"

<GrJComputersJaviess...@discussions.microsoft.com> wrote in message

news:F43E22D9-34FE-4452-92CD-817B4BBC30E3@microsoft.com...


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google