September 28, 200520 yr 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, 200520 yr by Spaceboy
September 28, 200520 yr 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, 200520 yr by gunsmokingman
September 28, 200520 yr 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
September 28, 200520 yr Yzöwl beat me to the punch: You have to escape %, since it's a special character just like \.%% = %\\ = \
September 28, 200520 yr Author 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
Create an account or sign in to comment