Jump to content

Problems with DirMove

Recommended Posts

I want to move the content of D:\downloads to D:\pictures in my program. I found DirMove, but that causes problems...

Func Move($dest)

   DirMove("D:\downloads\", "D:\pictures\ABC\" & $dest)


In a prior program exactly this piece of code did the job always properly, but now not anymore. The source path stays untouched, and a destination folder is created but empty.

I don't have a clue why it doesn't work anymore now. I've checked it dozens of times, read the article about DirMove, tried it with dozens of different combinations, but none lead to the result. I want the content of D:\downloads in D:\pictures\ABC without having another downloads folder within the destination folder or anything else... Thanks!

D:\downloads\cute_kitten.jpg should be D:\pictures\ABC\cute_kitten.jpg afterwards.

Link to comment
Share on other sites

You are not supposed to use a trailing backslash "Path of the source directory (with no trailing backslash)."  You use trailing backslashes in the source and destination.

Also, why are you creating the source directory after the move?  "The destination directory must already exist, except using with flag value $FC_CREATEPATH (8)."

What is in the variable $dest?

Could you post all your code? 

I would also suggest error checking.  Write your full path with the $dest variable to the console to see what it looks like.

Edited by Jfish

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...