Trying to combine two files in Windows OS - text-files

I'm trying to combine two files using Windows command. However I keep getting the error:
The system cannot find the file specified.
The two files I'm trying to combine are .txt if that helps.
Edit: Another error popped up in addition to the original error, which said
Error occurred while processing filename

Related

Running a fortran file multiple times simultaneously on Windows

I'm working with Windows.
I have a program in a fortran 90 file ..\my_folder\my_file.f90 that yields an output file ..\my_folder\output.dat.
I'd like to run this file many times simultaneously (to get statistics from multiple stochastic simulations). But this cannot be done in one folder. I get the error message : cannot open output file a.exe: Permission denied collect2.exe: error: ld returned 1 exit status.
And I don't want to copy-past it to different folders ..\my_folder\new_folder0\my_file.f90,..\my_folder\new_folder1\my_file.f90... since this is not convenient if I want to modify a line inside the fortran file.
I would like to know what tool I can use to make one fortran file run from different folders ?
And how is it possible to make it run but with different parameters please, so that in each folder the fortran file is run with different parameters ?
From the error message it seems also that if there was different .exe files and not only a.exe it would be ok. Is there a way that each time I compile the fortran file it would give a different .exe program to run ?

Windows Command Line errors that can't find file

I don't know much about the command line but have been using it a lot lately. I was experiencing errors in a C application when trying to copy a file which didn't make sense; so, I tried using the the command line to make sure the code should work and get an error I don't understand.
copy "AH/Copy testing/media.enc" "AH/Copy testing/new_name.enc" returns the system cannot find the specified file. So, I tried type "AH/Copy testing/media.enc" and get the same error.
However, if change the directory to "AH/Copy testing", then type media.enc it works.
I tried the same statements on different files of the same and different extensions and they all work. For example, type "AH/Copy testing/fileName.enc" works.
Why would media.enc not be found unless the directory is set to its own first? If I copy media.enc to other locations, I get the same error unless the directory is first changed.
Thank you.

How can i find the difference between two files in cmd

I am trying to compare two files and get the output in another text file. So far I have checked and found only solutions to Unix or other OS, but I am looking for a Windows 10 solution.
These are what I have looked at so far:
Find the difference between two files
How to find difference between two text files in different directories in ubuntu os through command-line
https://www.howtogeek.com/206123/how-to-use-fc-file-compare-from-the-windows-command-prompt/
https://www.softwaretestinghelp.com/compare-two-files-unix/
https://superuser.com/questions/805522/compare-two-files-and-output-the-differences
This sort of work but not exactly:
fc D:\Logs\Allchannels.txt D:\Logs\check.txt > D:\Logs\missing.txt
The output this gives is a list of whats in both files, then the user will have to manually have to look at the files and find out the difference themselves.
What I want is a text file that only shows what's missing between the two.
Example of whats in the two fils:
file 1:
Cart
Box
Money
file 2:
Cart
Money
so the output on the 3rd file should be Box as this is the value that's missing.
You could use Git BASH https://gitforwindows.org/
and do similar to what you had, with this command:
git diff path/to/file-1 path/to/file-2 > diff.txt

I can delete files in shell when in the directory, but I get a File not found error from outside the directory

I know this is a rudimentary question, but I am dumbfounded.
Let us say that I have two files in the following directory structure:
C:\Program Files\Program\Directory\Subdirectory\one.txt and C:\Program Files\Program\Directory\Subdirectory\Subsubdirectory\two.txt
When I run the following command in shell, I get File not found errors...
del C:\Program Files\Program\Directory\Subdirectory\one.txt C:\Program Files\Program\Directory\Subdirectory\Subsubdirectory\two.txt
I have also tried wrapping the file path and names in quotes with no success.
I have also tried a simple test on two files sitting on a user desktop without success: C:\Users\User\Desktop\one.txt and ...\two.txt etc.
For reference, I want to push a script which will remove the maintenance and update functionality from Firefox to prevent users from getting update messages etc, automatic updates and to break the functionality should someone find out how to try [I am also running mKiosk extension], and I want to push the script using SOTI MobiControl software.
You have spaces in your command path. You need to quote your arguments:
del "C:\Program Files\Program\Directory\Subdirectory\one.txt"
I have not found a solution to this syntax issue - however the problem is solved by the functionality of the SOTI Mobicontroler software.
In the package/script delivery, I am writing individual del commands for each file. SOTI appears to handle each script line one at a time and sequentially.

Getting file contents from TEE's Tf.Cmd command line

I am trying to get the file contents from a specific revision in TEE. According to https://msdn.microsoft.com/en-us/library/gg413270(v=vs.100).aspx the command should be something to the affect of : tf print -version:C1999 Class1.java. This is the error I am receiving:
An argument error occurred: The specified file does not exist at the specified version.
I know I am logged in and my credentials are cached as I am able to query for information like the History command. I also know that the file does exist in this revision as I am getting the information from the history query. Also using Tf.Exe (provided by visual studios) I am able to successfully run :
tf view -version:C1999 Class1.java
and get the contents perfectly fine. Unfortunately for this purpose I am unable to use tf.exe, and it has to the the TEE command line using Tf.Cmd, and they do not support the "view" command.
Any help on getting the file contents would be greatly appreciated.
edit- note I am using the full file path, and, as I said, it works perfectly fine in Tf.exe. Also I have tried using "$/" as the project root and still do not have any success.
Make sure you have installed the latest version of Team Explorer Everywhere.
To use this command, the Read permission on the file that you are
trying to print must be set to Allow.
Even though you could get tf view command to work. Also double check if you have related permission on that specific file.

Resources