Sign in to follow this  
Followers 0
Rex

Dir move (Documents and favorites)

9 posts in this topic

#1 ·  Posted (edited)

Hi im trying to create a script that moves my favorites+documents folders to a nother folder/drive

But when i run the script nothing happens B)

Here's my code

$Drive_1 = "D:"
$Folder_1 = "Profile"
$User_1 = "My Name"

DirMove(@Mydocumentsdir, $drive_1 & "\" &$Folder_1 & "\" & $User_1)
DirMove(@FavoritesDir, $drive_1 & "\" & $Folder_1 & "\" & $User_1)

What am i doing wrong ????

:EDIT > TypO _

:EDIT2 > DirCopy >> DirMove

Edited by Rex

Share this post


Link to post
Share on other sites



DirCopy(@FavoritesDir, $drive_1 & "\" & $Folder_1 & "\" & $User_1)

also.. I would make them go to different directories instead of smushing them all together.


[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites

Try with flag (1)

$Drive_1 = "D:"
$Folder_1 = "Profile"
$User_1 = "My Name"

DirCopy(@Mydocumentsdir, $drive_1 & "\" &$Folder_1 & "\" & $User_1, 1)
DirCopy(@FavoritesDir, $drive_1 & "\" & $Folder_1 & "\" & $User_1, 1)

Share this post


Link to post
Share on other sites

Woops it was my test code i posted i can see, it shoould bee dirmove insted of dir copy B) and the _ missing is just a typO in the post, it in my org script, so edit my post to fix typO LOL

Share this post


Link to post
Share on other sites

Try with flag (1)

$Drive_1 = "D:"
$Folder_1 = "Profile"
$User_1 = "My Name"

DirCopy(@Mydocumentsdir, $drive_1 & "\" &$Folder_1 & "\" & $User_1, 1)
DirCopy(@FavoritesDir, $drive_1 & "\" & $Folder_1 & "\" & $User_1, 1)
Have tryed that to, but it ain't working

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Those work in my testing... I havent tried with DirMove because.. I don't want to move those files. In fact I'm curious why you would want to.

Edit:

Now that I think of it.. perhaps the reason you cant move your profile is because of sharing violations (you are actively using your profile)

Edited by SpookMeister

[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites

Those work in my testing... I havent tried with DirMove because.. I don't want to move those files. In fact I'm curious why you would want to.

Edit:

Now that I think of it.. perhaps the reason you cant move your profile is because of sharing violations (you are actively using your profile)

When i setting up coputers i'm using a Creat User script i createded longago, and now i'm trying to update the script so i moves the users fav. and doc's to the profile folder i have created on a nother drive, but i too think that you are right, that the reason the i can't move the documents folder is becorse of i's a sys folder...

But not even vith the dircopy i can move the folders... B)

And al i wat to is to put C:\Doc...\...\my documents and C:\Doc...\...\Favorites to D:\Profile\Documets + D:\Profile\Favorites :o:graduated:

Share this post


Link to post
Share on other sites

This works for me.. it took a while the first time, but thats because my "My Documents" folder is huge.

Opt("TrayIconDebug", 1);0=no info, 1=debug line info

$Drive_1 = "D:"
$Folder_1 = "Profile"
$User_1 = "My Name"

DirCopy(@Mydocumentsdir, $drive_1 & "\" &$Folder_1 & "\" & $User_1 & "\" & "docs")
DirCopy(@FavoritesDir, $drive_1 & "\" & $Folder_1 & "\" & $User_1 & "\" & "favs")

Does the copy work for you, but the move does not?


[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

If you want to move Shell folders then you may need to do more as to create the destination folder 1st, change the pointer in registry and then move the contents over to the new destination.

Registry key to look at:

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

Also, Winnt.sif has a setting for setting the profile elsewhere during Windows setup.

[GuiUnattended]
ProfilesDir="D:\Documents and Settings\"

Also, the resource tools that Microsoft releases may have a commandline tool that deals with Shell folders.

Edited by MHz

Share this post


Link to post
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
Sign in to follow this  
Followers 0