We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,301 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

windows move command

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

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

thanks thanks

2
Contributors
6
Replies
3 Hours
Discussion Span
3 Years Ago
Last Updated
7
Views
k2k
Posting Whiz
354 posts since Nov 2007
Reputation Points: 15
Solved Threads: 1
Skill Endorsements: 0
cd "c:\Program Files"
move folder newfolder
rch1231
Veteran Poster
1,040 posts since Sep 2009
Reputation Points: 142
Solved Threads: 154
Skill Endorsements: 12
cd "c:\Program Files"
move folder newfolder

nothing offensive, but it is way off man.

k2k
Posting Whiz
354 posts since Nov 2007
Reputation Points: 15
Solved Threads: 1
Skill Endorsements: 0

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
rch1231
Veteran Poster
1,040 posts since Sep 2009
Reputation Points: 142
Solved Threads: 154
Skill Endorsements: 12

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.

k2k
Posting Whiz
354 posts since Nov 2007
Reputation Points: 15
Solved Threads: 1
Skill Endorsements: 0

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.

rch1231
Veteran Poster
1,040 posts since Sep 2009
Reputation Points: 142
Solved Threads: 154
Skill Endorsements: 12

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.

k2k
Posting Whiz
354 posts since Nov 2007
Reputation Points: 15
Solved Threads: 1
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0764 seconds using 2.68MB