Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Creating Drag and Drop Batch File

Featured Replies

Hi all!

I'm having trouble finding a way to create a batch file that will create pre-named folders within a folder that is dragged and dropped onto that batch file.

So my batch file currently looks like:

md New1
md "New 2"
md "New 3"\"New 4"

and I'm wondering if there is some way to create those folders in a folder that I can drag and drop onto the file.

Thanks!


The action of drag n' drop something over a .cmd file (batch file) is passed as first parameter to the batch, which is "%1".

So, create a batch file as follows:
 

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS
ECHO %1
ECHO %~1
ECHO %~d1
ECHO %~dp1
ECHO %~dpn1
ECHO %~dpnx1
ECHO %~z1
PAUSE

to have an idea of what you can get by dropping on the cmd file a directory.

As the usual recommendation, using directory or filenames including spaces is not particularly smart because there is the need to put them into double quotes (and remove quotes when needed), BTW out of the three lines you posted one is wrong.

jaclaz
 

VBS Drag And Drop Function

'-> Checks To Make Sure Only 1 Files Is Process
 If WScript.Arguments.Count = 0 Then
  MsgBox "You Must Drag And Drop One File Onto This Script.",4128, _
  "Error No Drag And Drop performed"
 ElseIf WScript.Arguments.Count = 1 Then 
  MsgBox WScript.Arguments.Item(0),4128, "Drag Drop Demo"
 ElseIf WScript.Arguments.Count > 1 Then
  MsgBox "Drag And Drop To Many Files, This Script Is Only For One File To Be Drag And Drop Onto " & _
  "This Script",4128,"Error To Many Files"
 End If 

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.