Copy link to clipboard
Copied
Hello, I am attempting to move 1 folder into another using the Folder.changePath() method built into ES. However, I am having issues getting the path right, or understanding what is required in the argument.
var moveme = Folder("C:/Users/Nate/Documents/moveme");
var movehere = Folder("C:/Users/Nate/Documents/movehere");
moveme.changePath("../../");
//moveme.changePath(movehere.getRelativeURI());
1 Correct answer
People typically use rename for moving files:
var s = new Folder('~/Desktop/test.png')
s.rename('~/Desktop/folder/test.png')
Copy link to clipboard
Copied
You are not doing anything to cancatenate the strings. The function uses absloute references. You cannot expect it to just append the two levels up prefix.
Mylenium
Copy link to clipboard
Copied
Care to help me out? I've tried using relative and absolute URI and paths to no avail. How and what are you concatenating?
Copy link to clipboard
Copied
People typically use rename for moving files:
var s = new Folder('~/Desktop/test.png')
s.rename('~/Desktop/folder/test.png')
Copy link to clipboard
Copied
A bit confused by your code. Why do you use a folder object to represent a .png file?
If this is how you move files, how can I move a folder and all the contents within it?
Thanks!

