forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Copy directory

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
thomas
Newbie


Joined: 15 Jan 2003
Posts: 23
Location: Germany

PostPosted: Wed Apr 09, 2003 1:00 pm    Post subject: Copy directory Reply with quote

Hello,

I want to move a Directory with some subdirectory´s and files, like this:

c:\test
c:\test\test2
c:\test\test2.txt
c:\test\test\test
c:\test\test\test\test2

Now I have tried to rename the folder with the camand:

directory rename,c:\test,d:\user

Then I get the message, "create folder" Yes/No.
If I click "yes" an error occured:

The file user cannot be create. The file already exits in the folder...

Does anybody know a workaround?
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Apr 09, 2003 2:36 pm    Post subject: Reply with quote

Hi Thomas,
It works for me with VDS 3.51... See the code below.

Code:
Title "Directory Rename Test"
directory create,c:\test
directory create,c:\test\test2
List create,1
List Add,1,Here is some test text
List SaveFile,1,c:\test\test2.txt
List clear,1
List close,1
directory create,c:\test\test
directory create,c:\test\test\test
directory create,c:\test\test\test\test2
wait 5
directory rename,c:\test,c:\user,showerrors


It is not prompting me. I am using Windows 2000 here. Also did C:\user already exists before you tried it. If you are using NT, 2000, or XP and the directory already existed then you might need to check the permissions on the folder to make sure you have the rights to overwrite the folder.

_________________
Home of

Give VDS a new purpose!


Last edited by vdsalchemist on Wed Apr 09, 2003 2:38 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Wed Apr 09, 2003 2:37 pm    Post subject: Reply with quote

I think Thomas means that he only wants to give up the root path, so without the subdirs... Maybe this is possible by using some old MS-DOS commands like MOVE...
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Apr 09, 2003 2:41 pm    Post subject: Reply with quote

Skit3000 wrote:
I think Thomas means that he only wants to give up the root path, so without the subdirs... Maybe this is possible by using some old MS-DOS commands like MOVE...


Well he said he was getting an error to confirm. Besides the Directory Rename command in VDS works almost like the MS-DOS command MOVE when you use the same drive and different filenames or folders Question

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Apr 09, 2003 2:48 pm    Post subject: Reply with quote

Skit,
Here is the help text for the MS-DOS MOVE command on Windows 2000.


    To rename a directory:
    MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2

    [drive:][path]filename1 Specifies the location and name of the file
    or files you want to move.
    destination Specifies the new location of the file. Destination
    can consist of a drive letter and colon, a
    directory name, or a combination. If you are moving
    only one file, you can also include a filename if
    you want to rename the file when you move it.
    [drive:][path]dirname1 Specifies the directory you want to rename.
    dirname2 Specifies the new name of the directory.

    /Y Suppresses prompting to confirm you want to
    overwrite an existing destination file.
    /-Y Causes prompting to confirm you want to overwrite
    an existing destination file.

    The switch /Y may be present in the COPYCMD environment variable.
    This may be overridden with /-Y on the command line. Default is
    to prompt on overwrites unless MOVE command is being executed from
    within a batch script.


Notice the part where it says renames the directory... When you rename a directory all directories and files move with it. You would have to take and make a c:\user folder and then copy the individual files and folders that you would want to go into the c:\user folder.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group