Page 1 of 1

Move drawers with same name

Posted: Mon Apr 15, 2019 1:15 am
by xabierpayet
is possible to move a drawer with files and subdrawers over another drawer containing another drawer with the same name,
to get the content of the 2 drawers in the same place? Movefile don´t write over a created drawer, and copyfile is very slow
for my purposes

example:

move----->dh0:mp3/
to--------> dh0:music/mp3

if i attemp to copy the dh0:mp3 drawer, to dh0:music/ drawer,hollywood don´t move any file

Re: Move drawers with same name

Posted: Mon Apr 15, 2019 6:22 am
by SamuraiCrow
On Amiga-like OS's you can relocate a file without copying it using the Rename command. I don't know if Hollywood's behavior on all other platforms work that way but it's something you can try.

Re: Move drawers with same name

Posted: Tue Apr 16, 2019 12:08 am
by xabierpayet
rename...
This function renames a file or a directory. oldname$ is the name of the file or directory to be renamed and can include a qualified path. newname$ is just the desired new name for the file/directory and must not contain a path specification.

This is not the solution, but thanks for the answer

Re: Move drawers with same name

Posted: Tue Apr 30, 2019 8:37 pm
by airsoftsoftwair
Actually, I don't understand what the problem here is. What do you want to move where?

Re: Move drawers with same name

Posted: Thu May 23, 2019 12:11 am
by Severin
xabierpayet wrote:
Mon Apr 15, 2019 1:15 am
example:

move----->dh0:mp3/
to--------> dh0:music/mp3
At a quick glance it looks like you have tried to copy the entire contents of a drawer to a single file called mp3

keep it simple:

movefile( dh0:mp3, dh0:music)
or
rename(dh0:mp3, dh0:music/mp3)

If you use /'s then you must use them on source and dest. This all assumes dh0:music/mp3 does not already exist. if it does then try something like:

For s$,t in DirectoryItems("dh0:mp3")
rename(s$, "dh0:music/mp3/" .. s$)
Next