1,105,402 Community Members

windows move command

Member Avatar
k2k
Posting Whiz
354 posts since Nov 2007
Reputation Points: 5 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

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

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

thanks thanks

Member Avatar
rch1231
Veteran Poster
1,187 posts since Sep 2009
Reputation Points: 131 [?]
Q&As Helped to Solve: 194 [?]
Skill Endorsements: 13 [?]
 
0
 
cd "c:\Program Files"
move folder newfolder
Member Avatar
k2k
Posting Whiz
354 posts since Nov 2007
Reputation Points: 5 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 
cd "c:\Program Files"
move folder newfolder

nothing offensive, but it is way off man.

Member Avatar
rch1231
Veteran Poster
1,187 posts since Sep 2009
Reputation Points: 131 [?]
Q&As Helped to Solve: 194 [?]
Skill Endorsements: 13 [?]
 
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
Member Avatar
k2k
Posting Whiz
354 posts since Nov 2007
Reputation Points: 5 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

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.

Member Avatar
rch1231
Veteran Poster
1,187 posts since Sep 2009
Reputation Points: 131 [?]
Q&As Helped to Solve: 194 [?]
Skill Endorsements: 13 [?]
 
1
 

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.

Member Avatar
k2k
Posting Whiz
354 posts since Nov 2007
Reputation Points: 5 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
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.

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.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article