| View previous topic :: View next topic |
| Author |
Message |
thomas Newbie
Joined: 15 Jan 2003 Posts: 23 Location: Germany
|
Posted: Wed Apr 09, 2003 1:00 pm Post subject: Copy directory |
|
|
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 |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Apr 09, 2003 2:36 pm Post subject: |
|
|
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 |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Apr 09, 2003 2:41 pm Post subject: |
|
|
| 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  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Wed Apr 09, 2003 2:48 pm Post subject: |
|
|
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 |
|
 |
|
|
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
|
|