Batch file examples
Example 1 - Creating a batch file to copy selected files
Example 2 - Creating a batch file to preserve long filenames
Create a batch file to copy selected files.
1. Tag the files you require.
2. Press CTRL-B
3. Type in the command line
COPY "%F" "C:\Backup\%F"
4. Type in a name for the batch file
BACKUP.BAT
The file will be created in the current folder. If you wanted the batch file in another folder you would use the following:
Command line:
COPY "%D%P%F" "C:\Backup\%F"
and the filename:
C:\Backup\backup.bat
Using batch file creation to preserve long filenames
1. Tag the files you wish to preserve
2. Press CTRL-B and type in the following command line
REN %SF "%F"
3. Type in a filename such as:
RENLONG.BAT
QD4 will create a batch file that will rename the files once they reach there destination which supports long filenames.
Following is a list of the parameters available in QD4 for use in batch files and running commands.
Parameter |
Meaning |
Example |
| %F | Current filename and extension | myfile.doc |
| %N | Current filename only (without extension) | myfile |
| %E | Current extension only (without filename) | doc |
| %D | Current drive ( ie C: ) | c: |
| %P | Current path without drive letter ( ie \Windows ) | \myfolder |
| %A | Current path and filename | c:\myfolder\myfile.doc |
| %O | Current path in other window | d:\otherfolder |
| %SF | Short version of current filename | myfil~1.doc |
| %SA | Short version of current drive, path and filename | c:\myfol~1\myfil~1.doc |
| %SO | Short version of current path in other window | d:\othe~1 |