![](banner.png)
# fsconv
ArOZ Online File System File Naming Method Converter - fsconv, design to do quick conversion between UM-filename and UTF8 filename on local file system.

## What is fsconv
fscov is a core library for converting Upload Manager File Naming Method that is commonly used in ArOZ Online System to UTF-8 filename that works on standard Windows + NTFS environment. 

This is a standalone implementation other than the original one which use Javascript in ao_module or even the older one PHP based conversion script.

## How can I use fsconv on my local system?
To use it, you need to launch the application with cmd or powershell if you are into Windows 10.


### Quick Start for non-geeks
#### Mount to Windows
Assume you have unplugged your USB drive from your ArOZ Online Device and plugged the USB drive into your current devices (any PC that is running Windows 7 or above), you might see a lot of folders encoded with UM-Filename method. 

To "mount" the drive for Windows, following the steps below.

1. Double click ```conv-2-windows.bat```

That is it! No more steps required. After the conversion finished, you will see all filenames are converted back into Windows supported filenames.

#### Mount to ArOZ Online
Assume you have copied some new files into the USB drive and you want to put it back into the ArOZ Online System. If you don't know if there are not-supported filenames inside the USB drive, you can choose to "mount" the drive back to the ArOZ system by the following step.

1. Double click ```conv-2-aroz.bat```

That is! Now follow the standard way to disable the USB drive and **REMOVE IT SAFELY** .

***I MEAN SAFELY, IT MEANS NOT UNPLUGGING IT WHILE IT IS STILL DOING READ WRITE. DAMAGED NTFS PARTITION IS DIFFICULT TO FIX ON LINUX***

## Advance Guide for Geeks
fsconv support the following methods.

```
Usage of fsconv.exe:
  -i string
        Input filename.
  -r    Enable recursive filename translation.
  -rd
        Recursive rename directory only.
  -rf
        Recursive rename file only.
  -um
        Convert to UMfilename format
  -utf
        Convert to standard UTF-8 filename format
```

Here are some example commands

```
#Convert all files, directories and their subdirs into UTF8 filename
./fsconv -r -utf -i test/

#Convert all files, directories and their subdirs into umfilenames
./fsconv -r -um -i test/

#Convert all files and files in subdirs into umfilenames but leave out foldername.
./fsconv -rd -um -i test/

#Convert all directories and subdirs into umfilenames but leave out filenames.
./fsconv -rf -um -i test/
```


To perform quick translations, you can also call the application with following shortcuts

```
./fsconv	#Convert all files in current and subdirs into UTF-8 (or local encoding) filenames
./fsconv -um	#Convert all files in current and subdirs into um-filenames
```