Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
move files
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
  2 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
 
Doug Howell  
View profile  
 More options Oct 23 2009, 12:31 pm
Newsgroups: microsoft.public.scripting.wsh
From: Doug Howell <douglasehow...@gmail.com>
Date: Fri, 23 Oct 2009 05:31:04 -0700 (PDT)
Local: Fri, Oct 23 2009 12:31 pm
Subject: move files
I need a script that will check a given directory for .pdf and .xls
files that have exactly the same name.  If a pair of .pdf and .xls
files with the same name are found, the script should move the .xls
file to another directory.

Any guidance would be appreciated.


    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 Oct 23 2009, 1:15 pm
Newsgroups: microsoft.public.scripting.wsh
From: "Pegasus [MVP]" <n...@microsoft.com>
Date: Fri, 23 Oct 2009 15:15:17 +0200
Local: Fri, Oct 23 2009 1:15 pm
Subject: Re: move files

"Doug Howell" <douglasehow...@gmail.com> wrote in message

news:d41ca6fc-742c-4ec8-9831-04b2faf044dc@e18g2000vbe.googlegroups.com...

>I need a script that will check a given directory for .pdf and .xls
> files that have exactly the same name.  If a pair of .pdf and .xls
> files with the same name are found, the script should move the .xls
> file to another directory.

> Any guidance would be appreciated.

You can easily do this with a humble batch file (see below). If you prefer a
VB Script then you should download the help file script56.chm from the
Microsoft site. It contains detailed examples for the "move" method of the
File System Object.

@echo off
set Source=D:\Fri 23
set Target=D:\Destination
if not exist "%Source%" echo Folder "%Source%" not found.
if not exist "%Target%" md "%Target%"
pushd "%Source%"
for %%a in (*.xls) do if exist "%%~na.pdf" move /Y "%%a" "%Target%"
popd


    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