anyone has ideas? i could cd to %ProgramFiles%... or move folder anotherFolder

move folder %ProgramFiles%
The syntax of the command is incorrect.

thanks thanks

Recommended Answers

All 6 Replies

cd "c:\Program Files"
move folder newfolder
cd "c:\Program Files"
move folder newfolder

nothing offensive, but it is way off man.

nothing offensive, but it is way off man.

Gee it works fine for me...

C:\Users\Rodney>mkdir "c:\Program Files"\test

C:\Users\Rodney>edit test.bat

C:\Users\Rodney>test

C:\Users\Rodney>cd "c:\Program Files"

c:\Program Files>move test newtest
        1 dir(s) moved.

c:\Program Files>cd \Users\Rodney

c:\Users\Rodney>type test.bat
cd "c:\Program Files"
move test newtest

Gee it works fine for me...

C:\Users\Rodney>mkdir "c:\Program Files"\test

C:\Users\Rodney>edit test.bat

C:\Users\Rodney>test

C:\Users\Rodney>cd "c:\Program Files"

c:\Program Files>move test newtest
        1 dir(s) moved.

c:\Program Files>cd \Users\Rodney

c:\Users\Rodney>type test.bat
cd "c:\Program Files"
move test newtest

%ProgramFiles% is a variable pointing to windows' program file no matter what drive "program file" locates at... maybe u didn't understand my question.

You might want to re-read your question:

anyone has ideas? i could cd to %ProgramFiles%... or move folder anotherFolder

No where do you mention the windows shell or what OS. You are correct about the variable provided it has been set in your environment. Try:

echo %ProgramFiles%

from your windows shell and see what you get. If you are trying to move program files to a new location from a system where you do not have Administrative Privileges forget it. You would also not be able to move it if any application is actively running from the directory.

Next time phrase your question correctly and tell us what your goal is and why and I will be your get some better answers.

commented: Yeah, the slow drip of usable information is hard work +20

You might want to re-read your question:

anyone has ideas? i could cd to %ProgramFiles%... or move folder anotherFolder

No where do you mention the windows shell or what OS. You are correct about the variable provided it has been set in your environment. Try:

echo %ProgramFiles%

from your windows shell and see what you get. If you are trying to move program files to a new location from a system where you do not have Administrative Privileges forget it. You would also not be able to move it if any application is actively running from the directory.

Next time phrase your question correctly and tell us what your goal is and why and I will be your get some better answers.

i expected people to know what i meant by showing

move folder %ProgramFiles%

which means moving "folder" TO "program file" ....

does *nix have %ProgramFiles% ??? it is so obvious it is windows environment... windows7 didn't change the move command.. and i don't need to argue with you about what shell....

not trying to fight here... i do appreciate your help. it is ok. just wait a bit for someone knows.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.