Jump to content
Macro Express Forums

Move Files - Folder?


Recommended Posts

Hi

I see the Move File/Files but where is the Move Folder/Folders????

 

Please do not tell me i can not move folders to an other directory????

 

you can move a folder to another folder, but you need to do so by dragging with a mouse. There does not appear to be a keyboard (or menu) equivalent.

Link to comment
Share on other sites

You can move a folder by using the Move File/Files command. Just don't specify a specific file in the path for the file to be moved.

 

e.g. Move File/Files: C:\Program Files\TestFolder

instead of

Move File/Files: C:\Program Files\TestFolder\TestFile.txt

 

But that appears to move the contents, not the folder. Suppose I want to move the folder C:\temp\Subfolder1\ to C:\NewDestination\. This macro follows your instructions above:

 

Move File/Files: "C:\temp\Subfolder1\" to "C:\NewDestination\"

 

<MOVE FILE/FILES Source="C:\\temp\\Subfolder1\\" Dest="C:\\NewDestination\\" Progress="FALSE" Recurse="FALSE"/>

 

But it fails in two respects:

1. It moves the files to C:\NewDestination

2. It doesn't delete the now empty folder C:\temp\Subfolder1\.

 

To do it properly, the macro needs to be re-written in a non-intuitive way, by including the old name in the destination, which is not something you would have to do if using Explorer:

 

Move File/Files: "C:\temp\Subfolder1" to "C:\NewDestination\Subfolder1"

 

<MOVE FILE/FILES Source="C:\\temp\\Subfolder1" Dest="C:\\NewDestination\\Subfolder1" Progress="FALSE" Recurse="FALSE"/>

 

Can you consider changing this in a future version please, so that it's more intuitive.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I used the Move File/Files command to move the folder. I have uploaded a screenshot of the settings used. This completely moved the folder. No folder was left on the C drive named Development.

 

Thanks Jason, but I can't reproduce even that simple example here. Could you post your code please, so that I can ensure I have it exactly right.

 

Can you do a more typical folder move, like my example?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Can you do a more typical folder move, like my example?

The key to moving a folder to a non-existing target (a folder that does not yet exist) is to leave off the trailing backslash in the Destination Path/Name field. The trailing backslash in the File(s) Path/Name field doesn't matter, at least not in this case. So your example would work if written like this:

<MOVE FILE/FILES Source="C:\\temp\\Subfolder1\\" Dest="C:\\NewDestination" Progress="FALSE" Recurse="FALSE"/>

If you leave the trailing backslash in the Destination Path/Name field then the files will be moved to the target destination, but the source folder itself will remain.

Link to comment
Share on other sites

The key to moving a folder to a non-existing target (a folder that does not yet exist) is to leave off the trailing backslash in the Destination Path/Name field. The trailing backslash in the File(s) Path/Name field doesn't matter, at least not in this case. So your example would work if written like this:
<MOVE FILE/FILES Source="C:\\temp\\Subfolder1\\" Dest="C:\\NewDestination" Progress="FALSE" Recurse="FALSE"/>

If you leave the trailing backslash in the Destination Path/Name field then the files will be moved to the target destination, but the source folder itself will remain.

 

Thanks Floyd. When I do a folder move normally (i.e. in Explorer) it's always to an existing location. That's what my earlier example was attempting to do.

 

Repeating my earlier question, would it be possible to implement this command in standard Windows fashion please?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

What do you consider standard Windows fashion to be, exactly? Drag-and-drop via Windows Explorer?

 

When I'm using Explorer, yes, I do normally drag and drop. But in the current context of using an ME Pro macro to do it for some reason, I was thinking along the lines of simple operations. Like either:

- Copy from one folder, go to the destination, and paste

or

- Send to > Any Folder (where again you just specify the destination, and choose Move or Copy).

 

With no special attention needed to slashes in either source or destination.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

The topic is asking for an answer to: "How do I move a folder using Macro Express Pro?". The answer has been presented. If the structure of the command syntax is too difficult to grasp; if it is not intuitive enough or it is not standard enough then don't use it. Find a different way.

Link to comment
Share on other sites

The topic is asking for an answer to: "How do I move a folder using Macro Express Pro?". The answer has been presented. If the structure of the command syntax is too difficult to grasp; if it is not intuitive enough or it is not standard enough then don't use it. Find a different way.

 

I'm reasonably hopeful that ISS themselves take a less hostile and defensive tone to constructive user suggestions for improvement.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

  • 5 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...