# Problems Pushing a File with ADB



## Pnkr0cker (Jun 21, 2012)

Okay guys, I know this seems trivial, but I've scoured the internet and all I get are vague examples of what I should be doing, and I need some particular help. I've Pulled and Pushed directories with my Toro, but I'm having issues pushing a specific file.

I have an audio file in a folder called "Music" in the "platform-tools" directory. The name of the file I want to push is called "Hanging On (Some Vox).wav", so, here is the command I'm using:

"...\platform-tools>adb push \Music\Hanging On (Some Vox).wav /mnt/sdcard/Music/"

I then get the huge list of usable commands for adb. The only extra progress I've made is removing all spaces in the audio file. Oddly enough, when I do that, I get this error, "cannot stat 'Music\Hanging-On-(Some-Vox).wav' : No such file or directory" when I'm most certainly typing the correct path in.

So I'm sure there are just some particular things I need to know when typing the commands in, and I appreciate any answers. I also have another question as well...

When PUSHING files or directories, do they have to be in the "platform-tools" folder? I tried pushing a directory from a separate location using,

"...\platform-tools>adb push C:\documents and settings\steven\My Documents\My Music\ /mnt/sdcard/"

That only gave me the adb commands list though... I only got it to work by moving all of my files to the "Music" folder in the "platform-tools" directory. I find it weird that I was able to select the destination of a directory from the sdcard to a specific location on my C:\ drive when PULLING, but pushing seems more particular...

Thanks again guys!


----------



## Jubakuba (Sep 8, 2011)

/
Not \

And if your file/folder has spaces wrap the location in "quotes"


----------



## AndroidChakra (Apr 14, 2012)

First i would highly suggest adding the ADB path to your system variables. That way you don't have to always go to the platform-tools folder you can just run adb commands from whatever folder you're in.

Secondly once you do that I would try being in the folder you want to push from instead of trying to type the path out. Most commands like that don't like spaces in paths so if you're entering a path with space you normally need to quote it (ie adb push "C:\Documents and Settings\steven") otherwise it doesn't know where to get the file from.


----------



## yarly (Jun 22, 2011)

How anyone puts up with cmd.exe for Windows in 2013 is beyond me. At least use powershell + profiles built into windows or preferably cygwin + kitty shell (so you can at least use the same syntax and commands as one does on Linux) and set your $PATH and shortcuts accordingly in either (via http://stackoverflow...l-path-variable for powershell and http://home.ubalt.ed.../addtopath.html for cygwin/bash). As a side effect to using either, you learn a skill that is at least potentially useful to an employer as well, besides learning a more intuitive way to navigate your pc via the terminal.


----------



## Pnkr0cker (Jun 21, 2012)

Jubakuba said:


> How anyone puts up with cmd.exe for Windows in 2013 is beyond me. At least use powershell + profiles built into windows or preferably cygwin + kitty shell (so you can at least use the same syntax and commands as one does on Linux) and set your $PATH and shortcuts accordingly in either (via http://stackoverflow...l-path-variable for powershell and http://home.ubalt.ed.../addtopath.html for cygwin/bash). As a side effect to using either, you learn a skill that is at least potentially useful to an employer as well, besides learning a more intuitive way to navigate your pc via the terminal.


I appreciate your suggestion, I understand that learning how to do scripts would save time, and powershell does make that easier. But honestly, I didn't make this post so I could get some condescending reply that has nothing directly to do with my topic. If you're going to make a suggestion, there are plenty of ways to do that in a polite, sensible way. Even worse, you listed the information like I should know all of this, which would not make approaching that easy at all...

Point being, if you feel like posting something about a general complaint, rather than troll my thread, try making your own post.


----------



## masully84 (Jul 17, 2012)

Pnkr0cker said:


> Uhhh, I understand the "" explanation, but I'm using XP, so I have to use back slashes when listing a location in Windows...
> 
> Thanks a ton for your suggestion. I'm not totally knowledgeable with this stuff yet, I just wanted to get away from using the BS MTP.
> 
> ...


Wow yarly made a general suggestion, didn't even say for you to use it and you jump down his throat. He's one of the most knowledge people on here. It's you dude, not him.

Sent from my Nexus 7


----------



## yarly (Jun 22, 2011)

masully84 said:


> Wow yarly made a general suggestion, didn't even say for you to use it and you jump down his throat. He's one of the most knowledge people on here. It's you dude, not him.
> 
> Sent from my Nexus 7


Yeah, my comment was not directed at the OP, just anyone that might be looking for a better alternative to cmd.exe. I said "you," but I was using it with a third person meaning (http://en.wikipedia.org/wiki/You#Third_person_usage).


----------



## AndroidChakra (Apr 14, 2012)

yarly said:


> Yeah, my comment was not directed at the OP, just anyone that might be looking for a better alternative to cmd.exe. I said "you," but I was using it with a third person meaning (http://en.wikipedia....rd_person_usage).


tl:dr? 
He means "you in the plural sense not the singular".


----------

