Jump to content

Recommended Posts

Posted (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 by Spaceboy

Posted (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 + 32

Else

Fso.MoveFolder(Fld1),(Fld2)

End If

Tested this script and it worked on my computer

If you want it in a 2 lines

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 + 32 Else Fso.MoveFolder(Fld1),(Fld2) End If

Saves As MoveAlcohol.vbs

Edited by gunsmokingman
Posted

The line you provided should work fine in a cmd window, however in a batch file try:

@echo off
move "%AllUsersProfile%\Start Menu\Programs\Alcohol 120%%" "%AllUsersProfile%\Start Menu\Programs\Burning Apps"
goto :eof

Posted
The line you provided should work fine in a cmd window, however in a batch file try:
@echo off
move "%AllUsersProfile%\Start Menu\Programs\Alcohol 120%%" "%AllUsersProfile%\Start Menu\Programs\Burning Apps"
goto :eof

Thanks. That fixed it :)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...