I am pretty new to TFS so I have this problem when I want to set a destination directory to my build.
Every time I launch the build, it dramatically fails and says "couldn't find \xxxxxxx\yyyyy\zzzz".
I think that my UNC path is wrong.
Let's assume that my drop directory (destination directory) is "C:\Project\" and my computer name is "lemoos-PC", what would the equivalent of my path in UNC notation?
I've tried these :
\\lemoos-PC\C\Project\
\\lemoos-PC\C:\Project\
\\lemoos-PC\Project\
but they don't seem to work.
Thanks in advance .
In your case, you should be able to use the following as your UNC drop location:
\\lemoos-PC\C$\Project
C$ is a special 'administrative' share that is normally already available on your machine. The $ makes it a hidden share that prevents other people from browsing to \\lemoos-PC and seeing it listed. Other people can only access it if they both a) know the name of the share and b) have administrative access to the computer.
The UNC path is really a path to a shared network folder and it would have the format
\\computername\sharename\directory\in\share
so it would depend on what the name of your network share is, not necessarily what your local path is. If you for example share your C:\Project folder as Project, the path would be
\\lemoos-PC\Project\
Related
I'm currently creating .csv files from a SQL view and writing to
#{Rails.root}/public/
which works no problem. In addition, I need to write these generated files to a Windows share in the form of:
\\NAME-APP.enterprise.company.com\Files
I've tried Net::SCP.upload, Net::SFTP.start, FileUtils, rsync, and even Dir.entries('share url here)` just to see if I can see anything in the folder, which generally results in
No such file or directory # dir_initialize
I can map my local computer to the Windows share point, in the form of:
smb://NAME-APP.enterprise.company.com/Files
but manually dragging and dropping to there isn't an acceptable solution in this case.
Feel like I've hit a wall and may be overlooking something. Have stumbled across this post but to no avail: How do I address a UNC path in Ruby on Windows?
Any advice on this is greatly appreciated.
Edit:
FileUtils.cp_r('/Volumes/Macintosh HD/Users/davidpardy/development/ror/sbb/oct31week/1a/FST-Export/public/1538791_new.txt', '\\\\NAME-APP\\Files')
doesn't return an error, but doesn't upload the .txt file to Files.
The solution is not to use FileUtils.cp_r(source_file, 'smb://...') because smb://... only represents the server address, not the mount folder on your filesystem.
In the terminal, run the mount command to find the path of the mount folder, which is what you'll use in ruby, e.g., FileUtils.cp_r(source_file, '/Volumes/mount_folder_here...').
Good day, colleagues,
can you advice me, how to make permanent links to files in SVN?
If I make a link, now I get something like:
http://172.29.15.15/svn/OFFICE_WORK/Trainings/123.xlsx
but if I move file to other directory, I get a error (file not found).
I know that in Sharepoint I can assign unique IDs (aditional option in admin panel) to files, and I'll get a permanent URL to file, that doesn't depend on it's location.
Is there an opportunity in SVN to make permanent link to file, that not depend on it's location?
Thank you in advance!
I'm not sure if I'm understanding the question correctly when you say "permanent link". But try adding an external property to your checked out directory. Right click on the directory you wish to add the 123.xslx file to, go to TortoiseSVN > Properties > New > Externals.
Then click New..., give the local path to the file and URL to the file which you posted above
Example:
Local Path: 123.xlsx
URL: http://172.29.15.15/svn/OFFICE_WORK/Trainings/123.xlsx
Hit OK. OK, again. Then do an SVN Update on the folder. Your 123.xlsx file should be included.
Not sure what you're referring to by not depending on location though. In subversion, in order to pull a file, you have to have the URL to gather it from. There isn't any ID feature unfortunately. It seems your repositories are based off an IP address of some sort... Is there any way you can use a common domain name for your path? That would probably solve your issue as well.
I have created a basic MSI project which will install few applications on the machine. My first step is to copy few folders and files to the destination machine. Then I have created two custom actions to run the exe files. I would like to skip custom action if that particular application is already installed on the machine. Also while copying the folders and files, I would like to skip if the folder or file already exists on the machine. I tried using install conditions, condition builder, system search but i am unable to resolve it.
Please provide any ideas to resolve these issues. Your answers would be greatly appreciated.
All this can be resolved by using System Search.Refer (http://helpnet.flexerasoftware.com/isxhelp22/helplibrary/NewLaunchCondition.htm)
1) To check if file exists select (File path, by searching folders),enter file name, select directory and assign depth depending on the directory mentioned.
Suppose A.txt is present inside \B\C folder and you are selecting B while searching then depth should be >=2. The property mentioned in this process will get set with the file path if file exists.
2) To check if folder exists select (Folder path, by searching in a specific folder), follow the above procedure and mention folder name instead of filename.
3) To check if application is installed you can check by following one the above processes and find application specific folders/files.
Lastly use the public properties as a condition for your custom actions and components. Suppose you are checking for a file and setting a property ASONFILEFOUND, just mention this in component/custom action condition and those wont run if file exists.
If you still face issues enable windows logging and view the log to check whether properties used in System Search are getting set or not.
Execute-MSI -Action Install -Path 'AcroRead.msi' -Transform 'Settings.mst' -Parameters '/q /norestart' -SkipMSIAlreadyInstalledCheck
use this command. if you are using Powershell for installation.
This will skip the MSI file check.
On my LAN I have 2 applications running in server/client mode developed with Delphi (but I don't think this is important).
On server PC (where run server application) there is a USB hard disk, this hard disk have many folder and subfolder shared on LAN.
Now I need to do this:
1. The server application must send to client application a shared folder (for example "d:\folder\subfolder\", then the client application must open this path to show the files (using explorer).
2. The user, using client application, must select a shared folder (for example "\SERVER\folder\subfolder\") and send this to server application, the server application must convert this path in local path (for example "d:\folder\subfolder\") and save it inside a database.
My problem is: is there a simple way to:
1. Convert the local path to remote path before send it to client se the client can open it easily?
2. Convert the remote path to local path before save it inside database.
NOTE: the main folder or main drive of shared hard disk can be change.
NOTE2: I'd like use IP address and not windows pc name if possible because it can be change.
I hope I explained.
Thanks
If I understand you correctly you want to acces some files that are inside some shared folder. Right?
If that is true then go and acces to these files unsing the network path which is formed in this manner
\\Networkedcomputer\SharedFolderName\Subfolder\...
where:
NetworkComputer is either a name of computer that is sharing that folder or its IP adress. I asume you are interested in using of IP adresses since you already have acces to that information from your other networked components.
SharedFolderName is the network name that was chosen when specific filder was set to be shared on the network. This name doesen't even have to be the same as the name of actual folder
Subolder can be any subfolder of the share folder
In order to get networked path to your shared folder you do need to know network name of the shared folder.
Perhaps you could even retrieve this information from SelectDirectory method which shows special dialog for selecting of directory, but I'm not sure if it does support networked folders. If not you could make use of OpenDialog.
NOTE: In any case when selecting the shared folder either with the use of SelectDirectory or OpenDialog you would need to go to that folder through Network Places (Network -> MyComputerName) and not directly through MyComputer.
But if you need to aquire the shared name for any local folder programatically I think you would have to go and read that information from registry as I'm not sure there is a specific API call for this.
EDIT: The answer on SO question below refers to several Delphi components that can be used for managing of Shared network resources. So I guess you could use to retrieve the network path for a shared local folder but I haven't tried them out.
How do I remotely obtain a system's network shares and connections?
Given that I am executing an EXE file (D2006 app) on a machine across the network, how can I get the pathname to the commondocs folder on that machine, given that the EXE might have been invoked from a UNC shortcut or a mapped drive letter shortcut, and the platform of the remote machine is not necessarily known (but will be >= WinXP)?
The situation is where the client has a large number of dispersed machines, and they can't be bothered installing my app on all the PC's. So what they do is install the executable somewhere on the network and give everybody a shortcut to that. This already seems to suit them fine and there are no issues there.
At their request, I made the app read the settings from an INI file placed in the same folder as the executable. I can only assume they have configured things so that all the users can write to that folder so that the INI file can be saved back.
However, I want to change it so that the INI file is read and saved to somewhere in the commondocs folder tree on the remote machine, so that they don't need to provide write access to a Program files folder.
The machine that's running your program is the only machine you have access to. The machine where your program is stored is irrelevant. It's just a disk drive. It might not be running Windows. It might even be a NAS that's hardly running anything at all.
If the customer wants the common-documents folder of the file server to act as the common-documents folder for everyone on all the client systems, then get the sysadmin to configure a shared folder on the server and then configure the clients to use that remote folder as their common-documents folder. There is no special programming required on your part for that.
To get the common-documents folder of the machine your program is running on, you can call any of various API functions, including ShGetFolderPath. The CSIDL value you need is CSIDL_COMMON_DOCUMENTS. If you call SHGetKnownFolderPath instead, use FOLDERID_PublicDocuments.