Search found 47 matches

by data808
16 Oct 2023 12:46
Forum: DOS Batch Forum
Topic: Batch File To Create Folder With Current Date
Replies: 14
Views: 35294

Batch File To Create Folder With Current Date

How do I make a batch file that creates a folder in a specific location on a network drive and names the folder the current date (mm-dd-yyyy)?

Thank you for your help on this.
by data808
01 Nov 2022 20:04
Forum: DOS Batch Forum
Topic: Batch To Delete Shortcut on Desktop
Replies: 2
Views: 2504

Re: Batch To Delete Shortcut on Desktop

I figured there was an extension that I couldn't see and I thought it was .ink not .lnk. So I did run it both with and without .ink but it didn't work. I just tried .lnk and it worked. Thanks for clarifying that. Also not sure if shortcut extensions are different but I am able to see all file extens...
by data808
31 Oct 2022 18:40
Forum: DOS Batch Forum
Topic: Batch To Delete Shortcut on Desktop
Replies: 2
Views: 2504

Batch To Delete Shortcut on Desktop

I run this batch file and it says it can't find it:

@echo off
del "%userprofile%\desktop\TEST"

pause


The shortcut is called TEST on the desktop but this batch file says it can't find it. Am I missing something?

Thanks.
by data808
26 Oct 2022 03:02
Forum: DOS Batch Forum
Topic: Another way to keep terminal window open
Replies: 2
Views: 2215

Another way to keep terminal window open

At the end of the batch file I have "pause" to keep the window open. However, any time I press any key, as the terminal states, this causes the window to close. I would like to keep the window open so that I can do a search for keywords within the terminal window using CTRL+F. Is there another funct...
by data808
25 Oct 2022 17:06
Forum: DOS Batch Forum
Topic: ROBOCOPY
Replies: 7
Views: 4597

Re: ROBOCOPY

It's ok. I'm at work and have a lot of time. I just check these forums in between my work to change it up a bit. Helps with the boredom.

Thanks for the help. I'll give it a try.
by data808
25 Oct 2022 15:56
Forum: DOS Batch Forum
Topic: ROBOCOPY
Replies: 7
Views: 4597

Re: ROBOCOPY

Oh sorry I was just trying to figure out how to add /xo to the line. I basically just want ROBOCOPY to copy everything that doesn't exist or files that are newer. So if it's older in the source folder, then do not copy it to the destination folder. I was also thinking of adding /E because then I can...
by data808
25 Oct 2022 12:46
Forum: DOS Batch Forum
Topic: ROBOCOPY
Replies: 7
Views: 4597

Re: ROBOCOPY

This is very helpful. Thank you!

So if I am using /s with my ROBOCOPY line and I wanted to add /xo to it, would it look like this:

ROBOCOPY "C:\Users\data8\Desktop\Folder 1" "C:\Users\data8\Desktop\Folder 2" /s /xo

Or can you only use one option at a time?

Thanks.
by data808
25 Oct 2022 03:43
Forum: DOS Batch Forum
Topic: ROBOCOPY
Replies: 7
Views: 4597

ROBOCOPY

ROBOCOPY has served me well in batch files for years. I usuaully use something like this: ROBOCOPY "C:\Users\data8\Desktop\Folder 1" "C:\Users\data8\Desktop\Folder 2" /s From what I understood, it just basically copies any new or updated files from a source location to the destination that you set. ...
by data808
24 Oct 2022 02:14
Forum: DOS Batch Forum
Topic: Batch File to extract files from a zipped file
Replies: 13
Views: 10306

Re: Batch File to extract files from a zipped file

You could probably use a JScript hybrid code. @if (0)==(0) echo off set "zip=Test.zip" set "dst=TestFolder" cscript.exe //nologo //e:jscript "%~f0" "%zip%" "%dst%" pause goto :eof @end var oFSO=new ActiveXObject('Scripting.FileSystemObject'), oShApp=new ActiveXObject('Shell.Application'); new Activ...
by data808
23 Oct 2022 19:09
Forum: DOS Batch Forum
Topic: Batch file to copy a file to desktop
Replies: 2
Views: 1833

Re: Batch file to copy a file to desktop

Worked like a charm. Thank you very much!!
by data808
23 Oct 2022 18:34
Forum: DOS Batch Forum
Topic: Backup Batch File
Replies: 15
Views: 6046

Re: Backup Batch File

Apologizes on the terminal screenshot. I've attached the correct screenshot. Also wanted to say thank you for finally solving the issue. So apparently the option "/s" is all your code was missing to actually back up the folder. Now everything is working as I had wanted it. Thanks again for all your ...
by data808
22 Oct 2022 21:02
Forum: DOS Batch Forum
Topic: Backup Batch File
Replies: 15
Views: 6046

Re: Backup Batch File

I should show you the terminal window screenshot as it says the filename, directory name, or the volume label syntax is incorrect. I've attached the screenshot. Also, does it matter if the source folder is backing up not only files but also subfolders with other files in them? Just want to make sure...
by data808
22 Oct 2022 20:50
Forum: DOS Batch Forum
Topic: Backup Batch File
Replies: 15
Views: 6046

Re: Backup Batch File

You are correct with the initial post of me wanting to have the date stamp in the folder below the parent folder (would that be the daughter folder?) lol. Then in my next post I changed it to the parent folder. I have changed some things around in the code as I am doing it on test folders right now ...
by data808
22 Oct 2022 16:02
Forum: DOS Batch Forum
Topic: Batch file to copy a file to desktop
Replies: 2
Views: 1833

Batch file to copy a file to desktop

I have a batch file that will search and delete the files that I want. The code is this:

@echo off
del "%userprofile%\desktop\*hs_err_*.log"

So with that being said, how do I copy a file from a folder to the desktop using a batch file?
by data808
22 Oct 2022 13:20
Forum: DOS Batch Forum
Topic: Backup Batch File
Replies: 15
Views: 6046

Re: Backup Batch File

Ok tried creating a new folder in the source folder with a notepad file just to test. Then I ran the batch file and still the same thing happens. It copies the new folder with notepad file into the backup folder then asks me to press any key to continue and when I press enter the terminal window clo...