Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 4th, 2009, 02:00 PM
Authorized User
 
Join Date: Apr 2009
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default Moving Files in ASP

I have following line in my code

fs.MoveFile filepathfrom & "\*.xml",filepathTo

I would like to know whether the above line moves all XML files from the source to destination folder and delete them from the source file or not ?? or it just copy them from source to destination folder and keep them in the source folder as well.
 
Old June 4th, 2009, 05:26 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

http://msdn.microsoft.com/en-us/library/ms950396.aspx

http://msdn.microsoft.com/en-us/library/ms950396.aspx

http://msdn.microsoft.com/en-us/library/2wcf3ba6(VS.85).aspx

Doesn't say a thing about copying files, does it?

Now look here:
http://msdn.microsoft.com/en-us/library/e1wf9e7w(VS.85).aspx

Enough said?
 
Old June 5th, 2009, 09:22 AM
Authorized User
 
Join Date: Apr 2009
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your quick reply.

Those links were really very helpfull but I still have a doubt in my mind that MoveFile will actually delete them from the source folder after it moves them to destination folder ? because it doen't says so exactly in a link....
 
Old June 5th, 2009, 04:06 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Okay, I give up. Why didn't you *TRY* it???

But, really. All you had to do to understand the difference is to open a DOS command window and try a COPY command. And then a MOVE command.

Yes, Windows supports both and always has. MOVE does *NOT* "delete from the source folder" because it does *NOT* perform a copy operation, AT ALL! It actually *DOES* just MOVE the *directory entry* without ever touching the actual file. It is MUCH MUCH more efficient than a copy-and-delete operation ever could be.

If you thought that files on disk are PHYSICALLY placed in certain parts of the disk and that a directory represents some sort of reserved chunk of the disk, you are only about 45 years too late. Yes, I remember encountering primitive operating systems that did that...maybe even as late as 35 years ago...but has never been true of any operating system from MS DOS on forward. And ditto for many systems prior to MS DOS. (Come to think of it, even including an OS file system I wrote back in the 70s.)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving files to new drive HaileyJ Windows Server 2 August 5th, 2008 10:59 AM
Moving OCX Files amd2003 Beginning VB 6 10 April 30th, 2008 01:08 PM
Moving files based on an Excel file sachtaridis Excel VBA 1 November 26th, 2007 12:39 PM
Moving files from one folder to another sachtaridis C# 1 November 23rd, 2007 04:33 AM
Moving to ASP.NET BrianWren VB.NET 2002/2003 Basics 7 March 10th, 2005 10:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.