abadaba Posted April 4, 2006 Share Posted April 4, 2006 How come this command does not work when called from a *.cmd file. But i can copy it directly into the command window and it works properly?MOVE /Y "%AllUsersProfile%\Start Menu\Programs\Alcohol 120%" "%AllUsersProfile%\Start Menu\Programs\CD-Burn" Link to comment Share on other sites More sharing options...
Yzöwl Posted April 4, 2006 Share Posted April 4, 2006 In a batch file the command would be:MOVE "%AllUsersProfile%\Start Menu\Programs\Alcohol 120%%" "%AllUsersProfile%\Start Menu\Programs\CD-Burn" Link to comment Share on other sites More sharing options...
abadaba Posted April 5, 2006 Author Share Posted April 5, 2006 What are the syntax for all the users userprofile, alluser etc? Does anyone have that?See that worked just fine...But now when i tryMOVE "%AllUsersProfile%\Start Menu\Programs\Norton AntiVirus%" "%AllUsersProfile%\Start Menu\Programs\System"Nothjing happens Link to comment Share on other sites More sharing options...
Djé Posted April 5, 2006 Share Posted April 5, 2006 What Yzöwl was saying was not to add a % sign at the end of your path, but to double any % sign there may be in it.that's because % sign are used for variables (like %AllUsersProfile%). Link to comment Share on other sites More sharing options...
gunsmokingman Posted April 5, 2006 Share Posted April 5, 2006 What are the syntax for all the users userprofile, alluser etc? Does anyone have that?See that worked just fine...But now when i tryMOVE "%AllUsersProfile%\Start Menu\Programs\Norton AntiVirus%" "%AllUsersProfile%\Start Menu\Programs\System"Nothjing happensYou have a extta % one of these at the end of Norton AntiVirus%, this would be my guess.If you feel comfortable using VBS script here one that in therory should work.Here is a brief explanation of the below script1:\ It checks for this folder All_UP & "\System\"If it there then it copyies norton then deletes the original location of nortons.2:\ If this folder does not exists All_UP & "\System\" thenit makes a that folder then it copies nortons then deletes nortons.I have tested this and The Norton Folder ended up in the System Folder and the original Nortons folders was deleted.Dim Act : Set Act = CreateObject("Wscript.shell") Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject") Dim All_UP : All_UP = Act.ExpandEnvironmentStrings("%AllUsersProfile%\Start Menu\Programs\") Dim MoveThis,MoveHere : MoveThis = All_UP & "\Norton AntiVirus" : MoveHere = All_UP & "\System\" If Fso.FolderExists(MoveHere) Then Fso.CopyFolder MoveThis, MoveHere : Fso.DeleteFolder(MoveThis) End If If Not Fso.FolderExists(MoveHere) Then Fso.CreateFolder(MoveHere): Fso.CopyFolder MoveThis, MoveHere : Fso.DeleteFolder(MoveThis) End If Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now