How Do I Copy And Then Delete Or Move It Then Rename It


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 1 of 2 12 LastLast
Results 1 to 15 of 21

Thread: How Do I Copy And Then Delete Or Move It Then Rename It

  1. #1
    Join Date
    Jul 2005
    Posts
    203

    Question How Do I Copy And Then Delete Or Move It Then Rename It

    As Title States
    Last edited by Code_Writer; 08-09-2005 at 07:01 PM.

  2. #2
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    I guess you mean file operation.

    to delete a file: Kill
    to copy: FileCopy
    to rename: Name

    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  3. #3
    Join Date
    Jul 2005
    Posts
    203
    Dose that work with folders?

  4. #4
    Join Date
    Jul 2005
    Posts
    203
    i just tryed that it dosn't work with folders:'(

  5. #5
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    The only folder-related commands in VB are MkDir and RmDir. To copy/move all files in a folder, you'd have to use the Dir function to return each file name, then perform the copy/move operation on each file.

    You might also look at the Folder class of the FileSystemObject, and/or the SHFileOperation API function.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  6. #6
    Join Date
    Jul 2005
    Posts
    203
    rmdir?

  7. #7
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    > rmdir?

    F1. :-)
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  8. #8
    Join Date
    Jul 2005
    Posts
    203
    o delete folder
    are you sure that i can't copy and delete or rename and move?

  9. #9
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    You can, using the methods I described in an earlier post. Other than that, I know of no way to do so.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  10. #10
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    you can use "RmDir" to remove a folder. "Name" can rename folders as well as files.

    I do not know of any VB statement that makes a copy of a folder (and recursively all the subfolders) unless FileSystemObject.CopyFolder

    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  11. #11
    Join Date
    Jul 2005
    Posts
    203
    i have a folder and infinet amount of folders inside of it and inside more folders so what do i do?

  12. #12
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    what do you want to do with that?
    Delete?
    Rename?
    Copy?
    Send via ftp to your buddies?
    Marco
    PS how much memory does your computer have, to keep an infinite amount of folders?
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  13. #13
    Join Date
    Jul 2005
    Posts
    203
    i am making an employee manegment sys and i need to archive the peoples data.

  14. #14
    Join Date
    Nov 2003
    Location
    Alameda, CA
    Posts
    1,737
    how and where are you going to archive the data? In a database? Burning a CD? In another computer? In a raid system?
    From your last post it looks like all the information is stored in a file system, is that correct? In only one computer or more than one?

    Maybe if you try to give us a little more description of what you are trying to accomplish we can be of a little more help here...

    Marco
    "There are two ways to write error-free programs. Only the third one works."
    Unknown

  15. #15
    Join Date
    Jul 2005
    Posts
    203
    Moveing it to a folder cald archives and then rename it as ther first name and ther last name

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center