Why a folder name is different in Windows Explorer than command line or cygwin? - directory

I have been using Robocopy to backup my computer files. I have been using the following command:
robocopy C:\Users\ J:\backup\ *.* /a /XD AppData /XJD /R:0 /s
When I look into my J drive in Windows Explorer I see folder named J:\Users\ but when I use dir from the command line I see a folder named j:\backup. The backup and user folder seem to be the same. I also tried looking at the content of the J drive in cygwin and see the backup folder but do not see a Users folder. What is going on? Is robocopy the culprit?

Just go into the backed up folder and delete the desktop.ini file. The folder name will revert back to the directory name. You copied the desktop.ini file from the source "users" folder that is causing the issue. You can and desktop.ini to your exclusions list with out any issues to your back up. They get created on the fly anyway if they are not present.
I tested this on a windows 7 pro machine just to verify.

The problem is not related to robocopy. The link below describes the problem.
https://superuser.com/questions/381110/windows-explorer-sees-different-file-name-from-cmd/381159#381159

Related

Changing directories in Spyder 3.5

I just updated my copy of Spyder on my Windows XP desktop to Spyder 3.5. How do I change directories so that the working directory is the one (in a subfolder in My documents)in which I have my Python Script and .txt data files (e.g. for running a regression)?
I had the same problem. I'm using the latest Spyder. I wanted my files to be in other than my home directory. I tried setting the current directory in Preferences. My files still wound up in my home directory. I tried the "cd" command. It said that the current directory was the one I wanted, but still the files were written to my home directory.
So I saved my script file in the directory I wanted. Now my files go where I would like.

missing .dependencies in user/ when bin/grav

I'm trying to install Grav on Heroku following the learn.getgrav.org docs.
I've got the web app deployed successfully, however it tells me to bin/grav install.
I do that and it gives me the following output:
ERROR Missing .dependencies file in user/ folder
I do not know what to do at this point as it's happened everytime I've installed Grav.
Hope this will be solved.
Sadly this problem is all too common when copying files :(
hidden (dotted) files are not always copied.
.dependencies
.htaccss
using ls -l -a in the folder where you extracted the files originally Dowloads/grav I could see the files that were not copied to fix it
cp .dependencies .htaccss /var/www/grav/
When I install GRAV on my server each time, I always copy the Zip file to the server, unzip it in place, then remove the zip file - using this method I have never had a problem with the installing of GRAV
HTH Rich

TFS 2015 Build vNext: Upload Files via WebDAV?

We want to upload files to a WebDAV-Folder and tried to use the "Windows Machine File Copy"-task for that (this uses ROBOCOPY inside). But we donĀ“t see any possibility to enter the destination folder in the right form.
1. We tried
\\our.website.de#SSL\DavWWWRoot\remote.php\webdav\
and
2. we also mounted this location as a network drive first and tried to use the drive letter,
but none of these attempts succeeded.
Is "Windows Machine File Copy" the right type of task for that or is there any custom task out there that accomplishes what we need?
Thx...
You should separate specified Machines and the folder path. Do not use it together.
Machines:
Example: dbserver.fabrikam.com, dbserver_int.fabrikam.com:5986,192.168.34:5986
Folder Path:
The folder on the Windows machine(s) to which the files will be
copied.
Example: C:\FabrikamFibre\Web
More detail info please refer this link: Deploy: Windows Machine File Copy

How to Copy a Local Directory to an Apache Server

I have a directory on my desktop and need to copy it to my server. I've looked up a command to do this being
scp -r /path/to/local/storage user#remote.host:/path/to/copy
but when I run it, it just tells me "No suck file or directory".
First of all is this the correct way to do this or is there an easier way to take a directory from local storage and put it onto an apache server? Once I get it on the server I can move it around just fine there. I just need to get it on there!
the path I'm using right now for local is
/Users/byw5k_000/Desktop/myWebsite
with myWebsite being the directory I want to copy onto my server.
I'm curious if I'm getting the path incorrect. What is the correct path to the desktop on a windows 10 computer and will this work for me to copy an entire directory onto an apache server?
You could try changing to your Desktop directory like this:
cd C:\Users\(username)\Desktop
and then running:
scp -r myWebsite user#remote.host:/path/to/copy
Should work as ling as you can change to your Desktop directory

Temp path too long when publishing a web site project

I am trying to publish an ASP.NET web site project using the Publish Web Site tool but get this error:
ASPNETCOMPILER(0,0): Error ASPRUNTIME: The specified path, file name,
or both are too long. The fully qualified file name must be less than
260 characters, and the directory name must be less than 248
characters.
I see that it is trying to copy the files to a very long path in AppData:
Copying all files to temporary location below for package/publish:
C:\Users\imx0\AppData\Local\Temp\1\WebSitePublish\BMW.Web-424993535\obj\Debug\AspnetCompileMerge\Source.
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v /BMW.Web -p C:\Users\imx0\AppData\Local\Temp\1\WebSitePublish\BMW.Web-424993535\obj\Debug\AspnetCompileMerge\Source C:\Users\imx0\AppData\Local\Temp\1\WebSitePublish\BMW.Web-424993535\obj\Debug\AspnetCompileMerge\TempBuildDir
I couldn't find anything about this temp directory in my .pubxml publish profile. How can I change the temporary directory that Visual Studio copies the files to?
Add this to your publish profile to modify the temporary directory for package/publish:
<AspnetCompileMergeIntermediateOutputPath>c:\shortPath\</AspnetCompileMergeIntermediateOutputPath>
Go to your web project folder, navigate to Properties\PublishProfiles folder.
open your profile file profile_name.pubxml (not the profile_name.pubxml.user)
copy/past <AspnetCompileMergeIntermediateOutputPath>c:\shortPath\</AspnetCompileMergeIntermediateOutputPath> under the <PropertyGroup> tag
save your file, you would be able to publish your website using this profil
This is sort of an aside answer, but I ran into this problem when trying to MSBuild a solution that depended on nodeJS and gulp. The problem was that the gulp dependency tree became very deep and the aspnet_compiler was trying to copy that tree to a deeper directory, resulting in this error. I tried everything noted in here but nothing worked.
As it so happened, I was building with TFS, so my solution was to run an attrib +h node_modules\* /S /D before msbuild to hide the directory tree and then attrib +h node_modules\* /S /D. That did it for me.
Sure would be nice if the error thrown in this situation by the compiler revealed the path that caused the write to fail...
try adding this
<IntermediateOutputPath>..\Temp</IntermediateOutputPath>
to the default <propertyGroup />
None of the other answers worked for me.
Visual Studio 2013 Community Edition.
I changed the TMP and TEMP environment variable to a short folder name and it worked.
We identified the lengthy files/folders using this solution, then corrected the issue from there:
Run this script at the command prompt: dir /s /b | sort /r /+261 > out.txt it will output all file paths into the out.txt file
Copy the output to an Excel file
In the next column over from what you pasted in add this Excel function: =LEN(A1) where "A1" is the cell, copy this against every file length so you can see how long the paths are
Sort in Excel by the path length
Identify the lengths over the recommended limit
I know this is a bit long-winded but if you have several files that are resulting in this issue you'll be able to see them all.
Even though the content of node_modules was not included in neither version control not in the *.csprojfile itself Deleting the whole node_modules folder did the trick for me.
You can try the selected solution for correcting the long file path issue.
Still if not able to publish due to some other issue, You can try below method.
=> If the 'Solution Configuration' is in 'Debug' mode, please change the same to 'Release' mode and Publish the files.
=> If the Solution Configuration is in Release mode, and if the problem still persists, please try to delete the dll generated earlier in the 'Release' folder of our project and Publish the project once again.
Any of the above method will solve the issue.
For me, using Visual Studio 2019, the only change to the publish profile .pubxml file that worked was:
<WPPAllFilesInSingleFolder>c:\shortPath\</WPPAllFilesInSingleFolder>
I discovered this property at line 484 of Microsoft.Web.Publishing.targets file. Full path was C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VisualStudio\v16.0\Web.

Resources