I want to delete all files in specific folder from Gitlab using a batch file.
My Git repository folder looks like:
Branch :Develop
Test_Repo\Files\MyFiles\F1,F2,F3,F4,F5.....
Before cloning, I need to delete all files from under MyFiles directory
How to handle this in a batch file, I am stuck in this part?
Related
I'm not programmer, and very beginner in batch files, I'm just designer and after more searches I didn't find any program or batch or anything help me.
I have folder with 28000 files in it.
28000 files named from 1.pdf to 28000.pdf
example: files 1.pdf, 205.pdf & 17856.pdf for one project, 2.pdf, 56.pdf & 5863.pdf for another project .. etc.
I have a .txt files for each project files name.
now i need to search/find each project files and copy them to each project folder
I am creating a batch file that create a repository and will import a folder from an existing and fixed directory into that repository.
The repository will be created in the folder in which the batch file is placed in. So for example, if a user decides to place the batch file in the directory called C:/temp and runs the batch file, the repository will be created and placed in C:/temp. If the batch file is placed in C:/foo, the repository will be created and placed in C:/foo.
To do this, the batch file has this command:
svnadmin create ./Module_QWER
In the batch file however, there is a problem when using "svn import". I tried to import a folder from a directory into the repository that was just created by doing this:
svn import "C:/temp/content to import" ./Module_QWER/Sample/Trunk
And an error occurs:
svn: E205000: Try 'svn help import' for more information
svn: E205000: Invalid URL 'Module_QWER/Sample/Trunk'
I understand that if the URL of the repository is in full the import will work, but as said before the URL of the repository will depend on where the user puts the batch file. Is there a way to import the folder into a repository no matter where the repository is placed as long as it is placed together in the same directory as the batch file?
When you use svn commands related to a specific repository, you need to have its full path and the protocol you are connecting with.
So the path to the repository should be something like:
file:///d:/full/path/to/repo
In your case it would be:
svn import "C:/temp/content to import" file:///%cd%/Module_QWER/Sample/Trunk -m "log message"
Edit: OK, I just noticed the title of the question is without using the protocol in the path.
I don't think it's possible, but full path to the repository can simply be achieved with using %~dp0% for the batch's current directory or %cd% for the current working directory.
Is there a way to create folder and copy artifacts into the created folders in sonatype nexus repository, through windows command line or batch files?
I have finally got solution to my problem by curl functionality.
curl -u admin:admin123 -T C:\upload\Test.txt http://Nexus_Repo_URL/folder_to_be_created/Test.txt
"folder_to_be_created" is the folder which is created in the repository and the file, 'Test.txt', is copied to it
Just upload the artifacts to whatever path is needed using one of the methods described here:
https://support.sonatype.com/hc/en-us/articles/213465818-How-can-I-programatically-upload-an-artifact-into-Nexus-
Any folders needed will be created automatically.
I have three sub folders, each contain different packages and that three packages will install through three different batch files which are present inside of the each folder.Now i need to create a batch file from root folder to install these three batch files.
Put the following in a batch file in the root folder, changing the folders and batch files to your folder and files names:
call Folder1/install1.bat
call Folder2/install2.bat
call Folder3/install3.bat
I have a directory 'help' where a web application is deployed. It contains a number of files at the root level and a number of sub folders.
I'd like to run a bat file (from outside the directory) which deletes everything within the directory except for the web.config file and a folder called 'log'.
Is this possible?
Not directly, but what you can do is copy the file and folder in a different location, delete the entire content of the folder, then restore the file and folder.