Spaceboy Posted September 28, 2005 Posted September 28, 2005 (edited) I'm having trouble moving one particular item within the start menu. The item in question is Alcohol 120%. I'm using the command below to move the folder:MOVE "%ALLUSERSPROFILE%\Start Menu\Programs\Alcohol 120%" "%ALLUSERSPROFILE%\Start Menu\Programs\Burning Apps"However when I run the batch file I get the following error:MOVE "C:\Documents and Settings\All Users\Start Menu\Programs\Alcohol 120ALLUSERSPROFILE\Start Menu\Programs\Burning Apps"The system cannot find the path specified.The % in the Folder name seems to be causing the problem. Any idea how I can get it to work? Thanks. Edited September 28, 2005 by Spaceboy
Asin Posted September 28, 2005 Posted September 28, 2005 You can try renaming the folder name before you do the move.
gunsmokingman Posted September 28, 2005 Posted September 28, 2005 (edited) Dim Act, Fso, AU_Prog : Set Act = CreateObject("WScript.Shell") Dim Fld1, fld2 : Set Fso = CreateObject("Scripting.FileSystemObject")AU_Prog = Act.SpecialFolders.Item("AllUsersPrograms")Fld1 = AU_Prog & "\Alcohol 120%"Fld2 = AU_Prog & "\Burning Apps"If Not Fso.FolderExists(Fld1) Then Act.Popup "Error Cannot Find This" & vbCrLf & Fld1, 7, "Error Folder", 0 + 32ElseFso.MoveFolder(Fld1),(Fld2) End If Tested this script and it worked on my computerIf you want it in a 2 linesDim Act, Fso, AU_Prog : Set Act = CreateObject("WScript.Shell") : Dim Fld1, fld2 : Set Fso = CreateObject("Scripting.FileSystemObject") : AU_Prog = Act.SpecialFolders.Item("AllUsersPrograms") : Fld1 = AU_Prog & "\Alcohol 120%" : Fld2 = AU_Prog & "\Burning Apps"If Not Fso.FolderExists(Fld1) Then Act.Popup "Error Cannot Find This" & vbCrLf & Fld1, 7, "Error Folder", 0 + 32 Else Fso.MoveFolder(Fld1),(Fld2) End If Saves As MoveAlcohol.vbs Edited September 28, 2005 by gunsmokingman
Yzöwl Posted September 28, 2005 Posted September 28, 2005 The line you provided should work fine in a cmd window, however in a batch file try:@echo offmove "%AllUsersProfile%\Start Menu\Programs\Alcohol 120%%" "%AllUsersProfile%\Start Menu\Programs\Burning Apps"goto :eof
kegobeer Posted September 28, 2005 Posted September 28, 2005 Yzöwl beat me to the punch: You have to escape %, since it's a special character just like \.%% = %\\ = \
Spaceboy Posted September 28, 2005 Author Posted September 28, 2005 The line you provided should work fine in a cmd window, however in a batch file try:@echo offmove "%AllUsersProfile%\Start Menu\Programs\Alcohol 120%%" "%AllUsersProfile%\Start Menu\Programs\Burning Apps"goto :eof<{POST_SNAPBACK}>Thanks. That fixed it
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